Skip to content

Add in a test to show the default country is correctly selected #145

Add in a test to show the default country is correctly selected

Add in a test to show the default country is correctly selected #145

Workflow file for this run

# 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