name: Unittest on: [push, pull_request] jobs: build: 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 }} # - uses: actions/cache@v2 # with: # path: /opt/hostedtoolcache/Python/ # key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }} # restore-keys: | # ${{ runner.os }}-${{ matrix.python-version }}- - name: Upgrade pip run: | python -m pip install --upgrade pip setuptools wheel - name: Install dependencies run: | pip install ".[dev]" --upgrade - name: Test with pytest run: | pytest test --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