mirror of
https://github.com/malmeloo/FindMy.py.git
synced 2026-04-18 00:53:56 +02:00
tests: Split up into separate jobs
This commit is contained in:
37
.github/workflows/test.yml
vendored
37
.github/workflows/test.yml
vendored
@@ -5,9 +5,12 @@ on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
versions:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
py-versions: ${{ steps.supported-versions.outputs.py-versions }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -22,7 +25,33 @@ jobs:
|
||||
poetry config virtualenvs.in-project true
|
||||
poetry install
|
||||
|
||||
- uses: wntrblm/nox@2024.04.15
|
||||
- id: supported-versions
|
||||
name: Get supported versions
|
||||
run: echo "py-versions=$(poetry run ./scripts/supported_py_versions.py)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Run unit tests
|
||||
run: poetry run nox
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: versions
|
||||
strategy:
|
||||
matrix:
|
||||
py-version: ${{ fromJson(needs.versions.outputs.py-versions) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ matrix.py-version }}"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install poetry
|
||||
poetry config virtualenvs.in-project true
|
||||
|
||||
# Only install main dependencies
|
||||
poetry install --only=test
|
||||
|
||||
- name: Run unit tests
|
||||
run: poetry run pytest
|
||||
|
||||
Reference in New Issue
Block a user