Skip to content

wording

wording #73

Workflow file for this run

name: tests
on: [push, pull_request]
env:
RUN: docker run -e PYTHONWARNINGS="error,default::DeprecationWarning" --shm-size 1G --rm opendbc /bin/bash -c
BUILD: docker buildx build --pull --load --cache-to type=inline --cache-from type=registry,ref=ghcr.io/commaai/opendbc:latest -t opendbc -f Dockerfile .
PYTHONWARNINGS: error
jobs:
unit-tests:
name: unit tests
runs-on: ubuntu-latest
#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
- name: Build Docker image
run: eval "$BUILD"
- name: Unit tests
run: ${{ env.RUN }} "pytest -n logical --durations=0"
static-analysis:
name: static analysis
runs-on: ubuntu-latest
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