Skip to content

Commit

Permalink
Merge pull request #286 from koterpillar/separate-lint-step
Browse files Browse the repository at this point in the history
Separate lint step in CI
  • Loading branch information
koterpillar authored Dec 1, 2024
2 parents 0e13a6a + b8e4ef9 commit 1f3fbf9
Showing 1 changed file with 32 additions and 21 deletions.
53 changes: 32 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,46 @@ on:
pull_request:

jobs:
ci:
name: "Test (${{ matrix.docker && format('{0} Docker', matrix.docker) || format('{0} host', matrix.os) }})"
lint:
name: "Lint (Python ${{ matrix.python }})"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu
docker: debian
python-version: "3.11"
- os: ubuntu
docker: ubuntu
python-version: "3.11"
- os: ubuntu
docker: fedora
python-version: "3.11"
- os: ubuntu
python-version: "3.11"
- os: macos
python-version: "3.11"
runs-on: ${{ matrix.os }}-latest
python:
- "3.11"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}
- name: Install dependencies
run: ./install-dev
- name: Lint
run: ./lint
test:
name: "Test (${{ matrix.docker && format('{0} Docker', matrix.docker) || format('{0} host', matrix.host) }})"
strategy:
fail-fast: false
matrix:
include:
- docker: debian
- docker: ubuntu
- docker: fedora
- host: ubuntu
- host: macos
runs-on: ${{ matrix.host || 'ubuntu' }}-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: ./install-dev
- name: Test
run: ./test-script
env:
Expand All @@ -45,13 +54,15 @@ jobs:
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-data-${{ matrix.os }}-${{ matrix.docker || 'host' }}
name: coverage-data-${{ matrix.host || 'docker' }}-${{ matrix.docker || 'host' }}
path: .coverage*
include-hidden-files: true
if-no-files-found: error

coverage:
needs: ci
needs:
- lint
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -76,7 +87,7 @@ jobs:

publish:
needs:
- ci
- test
- coverage
runs-on: ubuntu-latest
permissions:
Expand Down

0 comments on commit 1f3fbf9

Please sign in to comment.