Merge pull request #553 from simondeziel/move-to-canonical #314
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
name: CI tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint-python: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Repository checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip tox | |
- name: Lint Python files | |
run: | | |
tox -e lint | |
lint-shell: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Repository checkout | |
uses: actions/checkout@v3 | |
- name: Lint shell files | |
uses: ludeeus/action-shellcheck@master | |
check: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Repository checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip tox | |
- name: Typecheck Python files | |
run: | | |
tox -e check | |
test: | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.11"] | |
os: [ubuntu-latest] | |
include: | |
- os: ubuntu-20.04 | |
python-version: "3.6" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Repository checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip tox codecov | |
- name: Test | |
run: | | |
tox -e coverage | |
codecov | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
if: startsWith(github.event.ref, 'refs/tags') | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Release ${{ github.ref }} | |
generateReleaseNotes: true |