From 778a10e3059e5e6bcdf4ef8eb9de6862204f79c3 Mon Sep 17 00:00:00 2001 From: Michael Jansen Date: Wed, 6 Dec 2023 01:15:09 -0500 Subject: [PATCH] add python test CI job --- .github/workflows/pplib-ci.yml | 24 ++++++++++++++++++++++++ pathplannerlib-python/requirements.txt | 6 ++++++ 2 files changed, 30 insertions(+) create mode 100644 pathplannerlib-python/requirements.txt diff --git a/.github/workflows/pplib-ci.yml b/.github/workflows/pplib-ci.yml index e1f5336c..8994503d 100644 --- a/.github/workflows/pplib-ci.yml +++ b/.github/workflows/pplib-ci.yml @@ -53,6 +53,30 @@ jobs: # name: pplib-coverage # files: pathplannerlib/build/reports/jacoco/test/jacocoTestReport.xml + test-python: + name: "[PPLib Python] Unit Tests" + runs-on: ubuntu-22.04 + container: wpilib/ubuntu-base:22.04 + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + + - name: Install dependencies + working-directory: ./pathplannerlib-python + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Test with pytest + run: pytest + build-docker: strategy: fail-fast: false diff --git a/pathplannerlib-python/requirements.txt b/pathplannerlib-python/requirements.txt new file mode 100644 index 00000000..e14c9f7e --- /dev/null +++ b/pathplannerlib-python/requirements.txt @@ -0,0 +1,6 @@ +setuptools~=68.2.0 +pyntcore~=2024.0.0b3 +robotpy-wpimath~=2024.0.0b3 +robotpy-commands-v2~=2024.0.0b3 +robotpy-wpiutil~=2024.0.0b3 +robotpy-hal~=2024.0.0b3 \ No newline at end of file