Skip to content

Commit 9d7f240

Browse files
committed
Fixed Jules errors.
1 parent cab9049 commit 9d7f240

3 files changed

Lines changed: 42 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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

environment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dependencies:
1111
- pyyaml>=6.0
1212
- grpcio>=1.62.0
1313
- python-dotenv>=1.0.0
14+
- pytest>=7.0.0
15+
- pytest-cov>=4.1.0
1416
- pip:
1517
- torch==2.2.2
1618
- tensorboard>=2.12.0

pytest.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[pytest]
2-
addopts = --cov=algos --cov=buffers --cov=envs --cov=evals --cov=networks --cov=runners --cov=utils --cov-report=xml
2+
addopts = --cov=algos --cov=buffers --cov=envs --cov=evals --cov=networks --cov=runners --cov=utils --cov-report=xml:coverage.xml --cov-branch
33
filterwarnings =
44
ignore:Call to deprecated create function.*:DeprecationWarning:python.communicator_objects.*
55
ignore::DeprecationWarning:python.communicator_objects.*
66
ignore::DeprecationWarning
7+
norecursedirs = python .git .pytest_cache

0 commit comments

Comments
 (0)