Skip to content

Commit

Permalink
🔧 Update CI for multi-python
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Dec 30, 2023
1 parent 721b143 commit 9ec1873
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,24 @@ name: ☑️ CodeCheck
on: [push]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install pre-commit
run: pip install pre-commit poetry pytest typing-extensions
- name: Run pre-commit
run: pre-commit run --all-files
- name: Install dependencies
run: poetry config virtualenvs.create false && poetry install --extras "all"
- name: Run tests
env:
CODEBOX_API_KEY: ${{ secrets.CODEBOX_API_KEY }}
run: pytest
pre-commit:
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: eifinger/setup-rye@v1
with:
enable-cache: true
cache-prefix: 'venv-codeboxapi'
- name: pin version
run: rye pin ${{ matrix.python-version }}
- name: Sync rye
run: rye sync
- name: Run pre-commit
run: rye run pre-commit run --all-files
- name: Run tests
env:
CODEBOX_API_KEY: ${{ secrets.CODEBOX_API_KEY }}
run: rye run pytest -m "not skip_on_actions"

0 comments on commit 9ec1873

Please sign in to comment.