From 8ad21cf815e752848d4c617a50dfc51d3760ade9 Mon Sep 17 00:00:00 2001 From: Alberto Date: Mon, 13 May 2024 12:30:19 +0200 Subject: [PATCH] ci: stateful tests are now a separate job Stateful testing will become very time consuming once all tests cases will be finished. Since we're are already very close to hitting the 6 hours job execution limit we split the tests into two to also obtain faster parallel execution and avoiding bottlenecks. --- .github/workflows/integration-tests.yaml | 2 +- .github/workflows/unit-tests.yaml | 29 +++++++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml index 268e6cb8..49143321 100644 --- a/.github/workflows/integration-tests.yaml +++ b/.github/workflows/integration-tests.yaml @@ -17,7 +17,7 @@ jobs: with: path: | ~/.vvm - key: compiler-cache + key: compiler-cache-${{ hashFiles('**/requirements.txt') }} - name: Setup Python 3.10.4 uses: actions/setup-python@v2 diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index da34f219..6d58fe2c 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -6,7 +6,7 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - boa-tests: + unit-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -16,7 +16,7 @@ jobs: with: path: | ~/.vvm - key: compiler-cache + key: compiler-cache-${{ hashFiles('**/requirements.txt') }} - name: Setup Python 3.10.4 uses: actions/setup-python@v2 @@ -27,4 +27,27 @@ jobs: run: pip install -r requirements.txt - name: Run Tests - run: python -m pytest tests/unitary -n auto + run: python -m pytest tests/unitary -n auto -k 'not pool/stateful' + + stateful-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Cache Compiler Installations + uses: actions/cache@v2 + with: + path: | + ~/.vvm + key: compiler-cache-${{ hashFiles('**/requirements.txt') }} + + - name: Setup Python 3.10.4 + uses: actions/setup-python@v2 + with: + python-version: 3.10.4 + + - name: Install Requirements + run: pip install -r requirements.txt + + - name: Run Stateful Tests + run: python -m pytest tests/unitary/pool/stateful -n auto