Skip to content

Commit

Permalink
Upgrade GitHub Actions (#180)
Browse files Browse the repository at this point in the history
* Upgrade GitHub Actions

Also, remove redundant settings.

* tox -e py

* name: Set up Python

* if: matrix.tox-env == 'documents' then install Aspell

* matrix include: python-version: 3.12, continue-on-error: false

* Revert 3.12

* pip install --upgrade

* continue-on-error: False

* Update build.yml

* Update build.yml
  • Loading branch information
cclauss authored Sep 10, 2023
1 parent 14256e8 commit b58a196
Showing 1 changed file with 26 additions and 64 deletions.
90 changes: 26 additions & 64 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,38 @@ jobs:
tests:
strategy:
fail-fast: false
max-parallel: 4
max-parallel: 5
matrix:
platform: [ubuntu-latest] #, windows-latest]
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
include:
- python-version: 3.8
tox-env: py38
continue-on-error: False
continue-on-error: false
- python-version: 3.9
tox-env: py39
continue-on-error: False
continue-on-error: false
- python-version: '3.10'
tox-env: py310
continue-on-error: False
- python-version: '3.11'
tox-env: py311
continue-on-error: False
- python-version: '3.12'
tox-env: py312
continue-on-error: False
continue-on-error: false
- python-version: 3.11
continue-on-error: false
- python-version: 3.12
continue-on-error: false
# exclude:
# - platform: windows-latest
# python-version: 3.9

env:
TOXENV: ${{ matrix.tox-env }}

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
if: "!endsWith(matrix.python-version, '-dev')"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Set up development Python ${{ matrix.python-version }}
if: endsWith(matrix.python-version, '-dev')
uses: deadsnakes/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Python (Install Dependencies)
run: |
python -m pip install --upgrade pip setuptools tox coverage build
python -m pip install --upgrade pip
python -m pip install --upgrade build coverage setuptools tox
# # Windows
# - name: Windows (Setup MSYS2)
Expand Down Expand Up @@ -97,7 +84,7 @@ jobs:
env:
TOX_SPELL_REQUIRE: both
run: |
python -m tox
python -m tox -e py
continue-on-error: ${{ matrix.continue-on-error }}

# Results
Expand All @@ -110,53 +97,28 @@ jobs:
name: ${{ matrix.platform }}-${{ matrix.tox-env }}
fail_ci_if_error: false

lint:
docs_and_lint:
strategy:
max-parallel: 4
max-parallel: 2
matrix:
python-version: [3.11]

env:
TOXENV: lint
tox-env: [documents, lint]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox build
- name: Lint
run: |
python -m tox
documents:
strategy:
max-parallel: 4
matrix:
python-version: [3.11]

env:
TOXENV: documents

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox build
python-version: 3.x
- name: Install Aspell
if: matrix.tox-env == 'documents'
run: |
sudo apt-get install aspell aspell-en
- name: Build documents
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build setuptools tox
- name: ${{ matrix.tox-env }}
run: |
python -m tox
python -m tox -e ${{ matrix.tox-env }}

0 comments on commit b58a196

Please sign in to comment.