Skip to content

Commit

Permalink
ci: use github vars for python version specifications
Browse files Browse the repository at this point in the history
  • Loading branch information
KnownBlackHat authored May 11, 2024
1 parent e39f9f9 commit 1c830d3
Showing 1 changed file with 36 additions and 11 deletions.
47 changes: 36 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,64 @@ on:
branches:
- 'master'
pull_request:
merge_group:

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" ]
python-version: [ "3.11", "3.12" ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
- uses: actions/checkout@v4

- name: Run pre-commit
id: pre-commit
uses: pre-commit/action@v3.0.1

pyright:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11" ]
python-version: [ "3.11", "3.12" ]
fail-fast: false
continue-on-error: ${{ matrix.experimental }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: "3.11"
python-version: ${{ matrix.python-version }}
- run: pip install -r requirements.txt

- uses: jakebailey/pyright-action@v2

- name: Run Pyright (Linux)
uses: jakebailey/pyright-action@v2.2.1
with:
pylance-version: latest-release
python-platform: "Linux"
python-version: ${{ matrix.python-version }}
warnings: true

- name: Run Pyright (Windows)
uses: jakebailey/pyright-action@v2.2.1
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()
Expand Down

0 comments on commit 1c830d3

Please sign in to comment.