Skip to content

Commit

Permalink
speedup CI (commaai#1179)
Browse files Browse the repository at this point in the history
* no setup python

* replace with uv

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* slightly faster

* this doesnt do anything without seen ecus

* test

* is durations slow?

* not now

* test in another pr

* same to static

* static

* test

* test

* test

* the action used to cache as well

* test
  • Loading branch information
sshane authored Aug 21, 2024
1 parent 7d6f7cb commit c02e83d
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,40 @@ on:
jobs:
unit-tests:
name: unit tests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 1
#strategy:
# fail-fast: false
# matrix:
# run: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
python-version: '3.11'
- run: pip install -e .[testing,docs]
- run: scons -j$(nproc)
- run: pytest -n logical --durations=0
- name: setup python
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
# TODO: remove setuptools once https://github.com/cython/cython/issues/5751 is fixed
uv pip install -e .[testing,docs] setuptools
- run: uv run scons -j$(nproc)
- run: uv run pytest --durations=0

static-analysis:
name: static analysis
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
python-version: '3.11'
- run: sudo apt install --no-install-recommends -y cppcheck
- run: pip install -e .
- uses: pre-commit/action@v3.0.1
- name: setup python
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
uv pip install -e . pre-commit
- name: cache pre-commit environments
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pre-commit-
- run: uv run pre-commit run --all

0 comments on commit c02e83d

Please sign in to comment.