Skip to content

Refactoring

Refactoring #107

Workflow file for this run

name: Python tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Run tests on ${{ matrix.os }} with Python ${{ matrix.python }}
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.10']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install testing and linting dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-timeout pytest-cov
pip install flake8 black
pip install -e .
pip install gym bsuite matplotlib brax
# Setup dependency for minatar tests
git clone -n https://github.com/kenjyoung/MinAtar.git
cd MinAtar
git checkout c645454f07a3dfa5dd8dc81228b36d8256305cf0
rm minatar/__init__.py
pip install -e .
cd ..
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./gymnax --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./gymnax --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run unit/integration tests
run: |
python -m pytest -vv --all --durations=0 --cov=./ --cov-report=term-missing --cov-report=xml --ignore=tests/minatar/test_seaquest.py
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)