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.9", "3.10"] steps: - name: Cancel previous run uses: styfle/cancel-workflow-action@0.11.0 with: access_token: ${{ github.token }} - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 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: wandb login run: | wandb login e2366d661b89f2bee877c40bee15502d67b7abef - name: Test with pytest # ignore test/throughput which only profiles the code run: | pytest test --ignore-glob='*profile.py' --ignore="test/3rd_party" --cov=tianshou --cov-report=xml --cov-report=term-missing --durations=0 -v --color=yes - 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