Back to development: 7.7 #131
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.10", "3.11"] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox tox-gh-actions | |
- name: Test with tox | |
run: tox | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-results | |
path: .coverage.* | |
coverage: | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install coverage | |
- uses: actions/download-artifact@v3 | |
with: | |
name: coverage-results | |
- name: Coverage check | |
run: | | |
coverage combine | |
coverage report --include="django_countries/tests/*" --fail-under=100 -m | |
coverage report --omit="django_countries/tests/*" --fail-under=90 -m |