36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
name: Ubuntu
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
cpu:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.6, 3.7, 3.8]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Upgrade pip
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools wheel
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install ".[dev]" --upgrade
|
|
- name: Test with pytest
|
|
# ignore test/throughput which only profiles the code
|
|
run: |
|
|
pytest test --ignore-glob='*profile.py' --cov=tianshou --cov-report=xml --durations=0 -v
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
token: ${{ secrets.CODECOV }}
|
|
file: ./coverage.xml
|
|
flags: unittests
|
|
name: codecov-umbrella
|
|
fail_ci_if_error: false
|