diff --git a/.github/workflows/push-test.yml b/.github/workflows/push-test.yml index 79eefa3..0203c25 100644 --- a/.github/workflows/push-test.yml +++ b/.github/workflows/push-test.yml @@ -97,11 +97,26 @@ jobs: # Load cached venv if cache exists # Install dependencies if cache does not exist # ====== + - name: Load cached venv + id: cached-poetry-dependencies-dev + uses: actions/cache@v4 + with: + path: .venv + key: dev-${{ matrix.python-version }}-${{ matrix.poetry-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies + if: steps.cached-poetry-dependencies-dev.outputs.cache-hit != 'true' run: poetry install --no-interaction -E dev - - name: Run ASV benchmarks + # ====== + # Compare benchmarks between master and PR, and fail if any get worse + # ====== + + - name: Setup ASV run: | pip install asv cd asv_bench asv machine --yes - asv continuous $GITHUB_BASE_REF $GITHUB_REF --strict -e --python=same \ No newline at end of file + - name: Check regression + run: | + cd asv_bench + git fetch origin $GITHUB_BASE_REF:base $GITHUB_REF:pr + asv continuous $GITHUB_BASE_REF $GITHUB_REF -e --python=same