🚨 Fix lint error with new Ruff linting rules #19
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: Test & Lint | |
on: | |
push: | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.10" | |
cache: true | |
- name: Install dependencies | |
run: | | |
pdm install -G :all | |
echo `dirname $(pdm info --python)` >> $GITHUB_PATH | |
- name: Lint with Ruff | |
continue-on-error: true | |
run: pdm lint --output-format github | |
- name: Lint with Pyright | |
uses: jakebailey/pyright-action@v2 | |
continue-on-error: true | |
with: | |
pylance-version: latest-release | |
test: | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: true | |
- name: Install dependencies | |
shell: bash | |
run: | | |
pdm install -G :all | |
echo `dirname $(pdm info --python)` >> $GITHUB_PATH | |
- name: Run tests | |
run: pdm test | |
- uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: PYTHON_VERSION,OS | |
fail_ci_if_error: true |