Change CI #5
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 | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
permissions: | |
read-all | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ "3.11", "3.12" ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run pre-commit | |
id: pre-commit | |
uses: pre-commit/[email protected] | |
pyright: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ "3.11", "3.12" ] | |
fail-fast: false | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
cache: 'pip' | |
python-version: ${{ matrix.python-version }} | |
- run: pip install -r requirements.txt | |
- name: Run Pyright (Linux) | |
uses: jakebailey/[email protected] | |
with: | |
pylance-version: latest-release | |
python-platform: "Linux" | |
python-version: ${{ matrix.python-version }} | |
warnings: true | |
- name: Run Pyright (Windows) | |
uses: jakebailey/[email protected] | |
with: | |
pylance-version: latest-release | |
python-platform: "Windows" | |
python-version: ${{ matrix.python-version }} | |
warnings: true | |
check: # This job does nothing and is only used for the branch protection | |
if: always() | |
needs: | |
- pre-commit | |
- pyright | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/[email protected] | |
with: | |
jobs: ${{ toJSON(needs) }} |