From 533947ac5a26917c8b0dee596dab4a7c770a4fc5 Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Wed, 16 Nov 2022 18:41:55 -0800 Subject: [PATCH] update github workflow with python3.11, black 22.10.0, enable pip caching update github action versions --- .github/workflows/ci.yml | 30 ++++++++++++++++-------------- requirements-black.txt | 1 + requirements-ci.txt | 3 +++ 3 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 requirements-black.txt create mode 100644 requirements-ci.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 613297b..19f9c60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: name: Linux Test runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install dependencies run: | sudo apt-get update -qq @@ -43,7 +43,7 @@ jobs: name: macOS Test runs-on: macos-12 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install dependencies run: | brew install -q scons @@ -55,7 +55,7 @@ jobs: name: Windows Test runs-on: windows-2022 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install dependencies run: | python -m pip install -qq scons @@ -70,18 +70,19 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, macos-12, windows-2022] - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: 'requirements-ci.txt' - name: Install dependencies run: | - python -m pip install -qq --upgrade pip - python -m pip install -qq flake8 pytest wheel + python -m pip install -qq -r requirements-ci.txt - name: Lint with flake8 run: | # The GitHub editor is 127 chars wide @@ -95,17 +96,18 @@ jobs: black-check: name: Python Formatting - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' + cache: 'pip' + cache-dependency-path: 'requirements-black.txt' - name: Install dependencies run: | - python -m pip install -qq --upgrade pip - python -m pip install -qq black==22.3.0 + python -m pip install -qq -r requirements-black.txt - name: Format with black run: | bash black-check.bash diff --git a/requirements-black.txt b/requirements-black.txt new file mode 100644 index 0000000..70cb129 --- /dev/null +++ b/requirements-black.txt @@ -0,0 +1 @@ +black==22.10.0 diff --git a/requirements-ci.txt b/requirements-ci.txt new file mode 100644 index 0000000..d237ec3 --- /dev/null +++ b/requirements-ci.txt @@ -0,0 +1,3 @@ +flake8 +pytest +wheel