-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI/CD workflow to automatically test all targeted versions
- Loading branch information
1 parent
96fbf6c
commit 3ad3b45
Showing
3 changed files
with
96 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: "CI/CD" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
# Don't continue building images for a PR if the PR is updated quickly | ||
# For other workflows, allow them to complete and just block on them. This | ||
# ensures deployments in particular to happen in series rather than parallel. | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
flake8: | ||
name: flake8 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: pip install -r requirements.txt -r requirements-dev.txt | ||
|
||
- name: Lint | ||
run: flake8 pook tests | ||
|
||
tox: | ||
name: test with ${{ matrix.config.py }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- py: "3.11" | ||
os: "ubuntu-22.04" | ||
- py: "3.10" | ||
os: "ubuntu-22.04" | ||
- py: "3.9" | ||
os: "ubuntu-22.04" | ||
- py: "3.8" | ||
os: "ubuntu-22.04" | ||
# <3.8 are not available on ubuntu-latest (22.04) | ||
- py: "3.7" | ||
os: "ubuntu-20.04" | ||
- py: "3.6" | ||
os: "ubuntu-20.04" | ||
- py: "3.5" | ||
os: "ubuntu-20.04" | ||
- py: "pypy3.11" | ||
os: "ubuntu-22.04" | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python for test ${{ matrix.config.py }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.config.py }} | ||
cache: pip | ||
|
||
- name: Install tox | ||
run: python -m pip install tox-gh>=1.2 | ||
|
||
- name: Setup test suite | ||
run: tox -vv --notest | ||
|
||
- name: Run test suite | ||
run: tox --skip-pkg-install |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters