Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #316
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
tests: | |
name: ${{ matrix.tox-env }} - Python ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- 3.5 | |
- 3.9 | |
tox-env: | |
- py3 | |
- py3-django | |
- py3-openedx | |
include: | |
- python-version: 3.5 | |
tox-env: flake8 | |
- python-version: 3.9 | |
tox-env: bandit | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox flake8 | |
- name: Test with tox | |
run: | | |
tox -e ${{ matrix.tox-env }} | |
if [ -f .coverage ]; then mv .coverage ".coverage.${{ matrix.python-version }}-${{ matrix.tox-env }}"; fi | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-data | |
path: "*.coverage.*" | |
if-no-files-found: ignore | |
coverage: | |
name: Combine and check coverage | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v3 | |
with: | |
# Use latest, so it understands all syntax. | |
python-version: '3.10' | |
- run: python -m pip install --upgrade coverage[toml] | |
- name: Download coverage data | |
uses: actions/[email protected] | |
with: | |
name: coverage-data | |
- name: 'Combine coverage & fail if it is less than 100%' | |
id: coverage | |
run: | | |
coverage combine | |
coverage html --skip-covered --skip-empty | |
coverage report --fail-under=100 | |
- name: Upload HTML report if check failed | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() }} | |
with: | |
name: html-report | |
path: htmlcov |