Skip to content

Commit

Permalink
Tidy check workflow naming and graph (#570)
Browse files Browse the repository at this point in the history
Some usability improvements on the check workflow:
- shorter names so they aren't truncated by the github ui
- split unit and lint tests
- only build the snap if lint, unit, and mocked-plans succeed
  • Loading branch information
samuelallan72 authored Oct 3, 2024
1 parent 9759733 commit 6755fc0
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check workflow running linter, unit and functional tests
name: Tests

on:
workflow_call:
Expand All @@ -16,8 +16,8 @@ concurrency:
cancel-in-progress: true

jobs:
lint-unit:
name: Lint checkers and Unit tests
lint:
name: Linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -33,12 +33,27 @@ jobs:
python -m pip install tox
- name: Run lint checkers
run: tox -e lint

unit:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run unit tests
run: tox -e unit

mocked-plans:
name: Mocked plans tests
needs: lint-unit
name: Mocked plans
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -54,8 +69,11 @@ jobs:
run: tox -e mocked-plans

snap-build:
name: Build snap package
needs: lint-unit
name: Build snap
needs:
- lint
- unit
- mocked-plans
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand Down

0 comments on commit 6755fc0

Please sign in to comment.