Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
* origin/master:
  GA actions cache of full env (90->30s) (#26)
  • Loading branch information
ragulpr committed Jan 19, 2025
2 parents ecc7c59 + 810ad61 commit 7a2970b
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,37 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Checkout code
- name: Check out the code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: 'pip'

- name: Install dependencies

- name: Cache virtual environment
uses: actions/cache@v3
id: cache-venv
with:
path: venv
key: ${{ runner.os }}-venv-${{ hashFiles('requirements*.txt') }}
restore-keys: ${{ runner.os }}-venv-

- name: Install dependencies (only if no cache hit)
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Run tests
run: pytest -vvrP test.py
run: |
. venv/bin/activate
pytest -vvrP test.py
- name: Run performance tests
if: contains(github.event.head_commit.message, '[perf]')
run: python test_performance.py
run: |
. venv/bin/activate
python test_performance.py

0 comments on commit 7a2970b

Please sign in to comment.