Skip to content

Commit

Permalink
added workflow env caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ilsenatorov committed Aug 16, 2024
1 parent dd44b6f commit bf48266
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/run_test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Unit Test via Pytest
name: Pytest

on: [push, pull_request]

Expand All @@ -11,17 +11,29 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip packages
uses: actions/cache@v3
with:
path: ~/.cache/pip # Cache pip packages
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
coverage run -m pytest -v -s
- name: Generate Coverage Report
run: |
coverage report -m
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
torch
lightning
torchmetrics
rich
fair-esm
jsonargparse
wandb
Expand Down

0 comments on commit bf48266

Please sign in to comment.