forked from commaai/opendbc
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* speeeeed * version * disable * cppcheck * pip install * no update? * timeout
- Loading branch information
1 parent
fddef20
commit 3d64610
Showing
1 changed file
with
16 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
name: tests | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
RUN: docker run -e PYTHONWARNINGS="error,default::DeprecationWarning" --shm-size 1G --rm opendbc /bin/bash -c | ||
|
@@ -11,6 +15,7 @@ jobs: | |
unit-tests: | ||
name: unit tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
#strategy: | ||
# fail-fast: false | ||
# matrix: | ||
|
@@ -25,24 +30,15 @@ jobs: | |
static-analysis: | ||
name: static analysis | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
env: | ||
# package install has DeprecationWarnings | ||
PYTHONWARNINGS: default | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build Docker image | ||
run: eval "$BUILD" | ||
- name: pre-commit | ||
# TODO: a package pre-commit installs has a warning, remove the unset once that's fixed | ||
run: ${{ env.RUN }} "git init && git add -A && unset PYTHONWARNINGS && pre-commit run --all" | ||
|
||
docker-push: | ||
name: docker push | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/opendbc' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build Docker image | ||
run: eval "$BUILD" | ||
- name: Push to dockerhub | ||
run: | | ||
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | ||
docker tag opendbc ghcr.io/commaai/opendbc:latest | ||
docker push ghcr.io/commaai/opendbc:latest | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- run: sudo apt install --no-install-recommends -y cppcheck | ||
- run: pip install -e . | ||
- uses: pre-commit/[email protected] |