Improve CI job to fail faster/use up fewer runners when things fail

This commit is contained in:
Ian McEwen
2026-07-22 11:40:34 -07:00
parent 11b71e9587
commit dca0b1fced

View File

@@ -1,4 +1,7 @@
name: CI name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: on:
push: push:
branches: branches:
@@ -8,7 +11,29 @@ on:
- master - master
jobs: jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install meshtastic from local
run: |
python -m pip install --upgrade pip
pip3 install poetry
poetry install
poetry run meshtastic --version
build: build:
needs: validate
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
@@ -21,8 +46,10 @@ jobs:
- "3.14" - "3.14"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Python 3 - name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Uninstall meshtastic - name: Uninstall meshtastic
run: | run: |
pip3 uninstall -y meshtastic pip3 uninstall -y meshtastic
@@ -53,26 +80,9 @@ jobs:
name: codecov-umbrella name: codecov-umbrella
fail_ci_if_error: true fail_ci_if_error: true
verbose: true verbose: true
validate:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Python 3
uses: actions/setup-python@v5
- name: Install meshtastic from local
run: |
python -m pip install --upgrade pip
pip3 install poetry
poetry install
poetry run meshtastic --version
simradio_testing: simradio_testing:
needs: [validate, build]
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false