From e6e22da29ba294dbd6b8cc33d8f6129ae1786fde Mon Sep 17 00:00:00 2001 From: dolf Date: Wed, 25 Jun 2025 20:05:10 +0200 Subject: [PATCH] Run unit tests in CI. --- .github/workflows/test.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ecf7506 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,38 @@ +name: Test + +on: + push: + branches: [ 'main' ] + pull_request: + branches: [ 'main' ] + +jobs: + test-windows-excel: + timeout-minutes: 120 + runs-on: [self-hosted, python3, Windows, excel] + steps: + - uses: actions/checkout@v4 + timeout-minutes: 10 + + - name: Install dependencies + uses: nick-fields/retry@v3 + with: + max_attempts: 3 + timeout_minutes: 20 + command: pip install --upgrade -r requirements.txt -r test-requirements.txt + env: + PIP_EXTRA_INDEX_URL: https://aa:${{ secrets.PYPI_PASSWORD }}@pypi.autoactuary.com/simple + + - name: Compile workbooks + uses: nick-fields/retry@v3 + with: + max_attempts: 3 + timeout_minutes: 20 + command: python scripts/compile.py + + - name: Run unit tests + uses: nick-fields/retry@v3 + with: + max_attempts: 3 + timeout_minutes: 20 + command: python -X utf8 -m unittest