name: Python sanity on: [push, pull_request] jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: [2.7, 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: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements-dev.txt - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. flake8 . --exit-zero \ | awk -F: '{ gsub(/^[ \t]+/,"",$4); print "::error file=" $1 ",line=" $2 ",col=" $3 "::" $4 }' - name: Run tests run: | coverage run coverage report - name: Upload coverage report to Codecov env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | coverage xml bash <(curl -s https://codecov.io/bash) \ || echo "::warning ::Codecov upload failed"