on: [push] name: CI jobs: build: name: Build and test runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest] python-version: ['3.5', '3.6', '3.7', '3.8', '3.9'] include: - os: ubuntu-18.04 python-version: '3.4' installTyping: ${{ true }} fail-fast: false steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Cache pip uses: actions/cache@v2 with: # This path is specific to Ubuntu path: ~/.cache/pip # Look to see if there is a cache hit for the corresponding requirements file key: v1-pip-${{ runner.os }}-${{ matrix.python-version }} restore-keys: | v1-pip-${{ runner.os }} v1-pip- - name: Install dependencies run: | pip install pytest pip install codecov - name: Install typing for old Python run: pip install typing if: matrix.installTyping - name: Install lcov run: sudo apt install -yy lcov - name: Build the code run: python ./setup.py build_ext -i - name: Run tests run: python -m pytest tests - name: Cleanup run: make clean - name: Re-build with coverage info run: CFLAGS="-coverage" python ./setup.py build_ext -i - name: Test with coverage run: python -m pytest tests - name: Convert data with lcov run: lcov --capture --no-external --directory . --output-file coverage.info - name: Coveralls Parallel uses: coverallsapp/github-action@master with: github-token: ${{ secrets.github_token }} flag-name: run-${{ matrix.os }}-${{ matrix.python-version }} parallel: true path-to-lcov: coverage.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: #files: ./coverage1.xml,./coverage2.xml #directory: ./coverage/reports/ #flags: unittests #env_vars: OS,PYTHON name: codecov-umbrella #fail_ci_if_error: true path_to_write_report: ./coverage/codecov_report.txt #verbose: true finish: needs: build runs-on: ubuntu-latest steps: - name: Coveralls Finished uses: coverallsapp/github-action@master with: github-token: ${{ secrets.github_token }} parallel-finished: true