@@ -10,28 +10,41 @@ jobs:
1010 python-version : ["3.11"] # As specified in README
1111
1212 steps :
13- - uses : actions/checkout@v4
14- - name : Set up Python ${{ matrix.python-version }}
15- uses : actions/setup-python@v5
16- with :
17- python-version : ${{ matrix.python-version }}
18- - name : Install dependencies
19- run : |
20- python -m pip install --upgrade pip
21- pip install -r requirements.txt
22- # The following is needed because of the editable install for the python/ sub-package
23- pip install -e ./python
24- - name : Test with pytest
25- run : |
26- pytest --cov=algos --cov=buffers --cov=envs --cov=evals --cov=networks --cov=runners --cov=utils --cov-report=xml:coverage.xml
27- - name : Upload coverage reports to Codecov
28- uses : codecov/codecov-action@v4
29- with :
30- token : ${{ secrets.CODECOV_TOKEN }} # User will need to set this up in GitHub secrets
31- files : coverage.xml
32- fail_ci_if_error : true
33- - name : Upload coverage.xml as artifact
34- uses : actions/upload-artifact@v4
35- with :
36- name : coverage-report
37- path : coverage.xml
13+ - uses : actions/checkout@v4
14+
15+ - name : Set up Python ${{ matrix.python-version }}
16+ uses : actions/setup-python@v5
17+ with :
18+ python-version : ${{ matrix.python-version }}
19+
20+ - name : Cache pip dependencies
21+ uses : actions/cache@v3
22+ with :
23+ path : ~/.cache/pip
24+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/environment.yaml') }}
25+ restore-keys : |
26+ ${{ runner.os }}-pip-
27+
28+ - name : Install dependencies
29+ run : |
30+ python -m pip install --upgrade pip
31+ pip install -r requirements.txt
32+ # The following is needed because of the editable install for the python/ sub-package
33+ pip install -e ./python
34+
35+ - name : Test with pytest
36+ run : |
37+ pytest
38+
39+ - name : Upload coverage reports to Codecov
40+ uses : codecov/codecov-action@v5
41+ with :
42+ token : ${{ secrets.CODECOV_TOKEN }} # User will need to set this up in GitHub secrets
43+ files : coverage.xml
44+ fail_ci_if_error : false
45+
46+ - name : Upload coverage.xml as artifact
47+ uses : actions/upload-artifact@v4
48+ with :
49+ name : coverage-report
50+ path : coverage.xml
0 commit comments