mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
openpilot v0.9.7 release
date: 2024-06-11T01:36:39 master commit: f8cb04e4a8b032b72a909f68b808a50936184bee
This commit is contained in:
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
name: tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
RUN: docker run -v $GITHUB_WORKSPACE:/project/opendbc -w /project/opendbc -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: Build opendbc
|
||||
run: ${{ env.RUN }} "cd ../ && scons -j$(nproc) --minimal"
|
||||
- name: Unit tests
|
||||
run: ${{ env.RUN }} "pytest"
|
||||
|
||||
static-analysis:
|
||||
name: static analysis
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
run: eval "$BUILD"
|
||||
- name: Build opendbc
|
||||
run: ${{ env.RUN }} "cd ../ && scons -j$(nproc) --minimal"
|
||||
- name: pre-commit
|
||||
# TODO: a package pre-commit installs has a warning, remove the unset once that's fixed
|
||||
run: ${{ env.RUN }} "unset PYTHONWARNINGS && pre-commit run --all"
|
||||
- name: Generator test
|
||||
run: ${{ env.RUN }} "generator/test_generator.py"
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user