Skip to content

Commit

Permalink
Use devenv in GitHub test actions
Browse files Browse the repository at this point in the history
This will install all Python versions, run linting and run tests for
all versions.
  • Loading branch information
kissgyorgy committed Nov 18, 2024
1 parent a3a1699 commit 64c35ae
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --all-extras
- name: Pre-commit checks
run: |
poetry run pre-commit run -a
- name: Test
run: |
poetry run pytest
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v26

- uses: cachix/cachix-action@v14
with:
name: devenv

- name: Install devenv.sh
run: |
nix profile install nixpkgs#devenv
devenv just install-versions
- name: Check linting, formatting
run: devenv shell just check

- name: Run all tests
run: devenv shell just test-all

0 comments on commit 64c35ae

Please sign in to comment.