From 5585e7f42cd07ee2e2f721824cbfae8c12fe17ea Mon Sep 17 00:00:00 2001 From: Arthur Moore Date: Sun, 4 Aug 2024 01:31:51 -0400 Subject: [PATCH] Run the test suite as a GitHub Action --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc4feaf..f3b88d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,12 +8,12 @@ on: workflow_dispatch: jobs: - Test: + PreCommit: name: pre-commit runs-on: ubuntu-latest steps: - name: 💾 Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🪝 Cache pre-commit hooks uses: actions/cache@v3 @@ -29,6 +29,28 @@ jobs: - name: 🔥 Test run: pre-commit run --show-diff-on-failure --all-files + Test: + name: Unit Tests + runs-on: ubuntu-latest + steps: + - name: 💾 Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install OpenSCAD + run: | + sudo apt-get update + sudo apt-get install openscad + + - name: Run Unit Tests + shell: bash + working-directory: ./tests + run: python3 -m unittest + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false