CI: make sure the tests matrix depends on linting

This commit is contained in:
Baptiste Jonglez 2024-03-25 20:42:45 +01:00 committed by zorun
parent 843f2df877
commit 510c8db07f
2 changed files with 21 additions and 20 deletions

View file

@ -1,4 +1,4 @@
name: Lint & Docs name: Check doc
on: on:
push: push:
@ -7,22 +7,6 @@ on:
branches: [ 'master', 'stable-*' ] branches: [ 'master', 'stable-*' ]
jobs: jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run Lint
run: tox -e lint
test_doc: test_doc:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -1,4 +1,4 @@
name: Unit tests name: Lint & unit tests
on: on:
push: push:
@ -7,10 +7,27 @@ on:
branches: [ 'master', 'stable-*' ] branches: [ 'master', 'stable-*' ]
jobs: jobs:
test: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run Lint
run: tox -e lint
test:
# Dependency on linting to avoid running our expensive matrix test for nothing
needs: lint
runs-on: ubuntu-latest
# Use postgresql and MariaDB versions of Debian bookworm # Use postgresql and MariaDB versions of Debian bookworm
services: services:
postgres: postgres: