Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ windows-latest, macos-latest, ubuntu-20.04 ]
os: [ windows-latest, macos-latest, ubuntu-latest ]
exclude: # Python < v3.8 does not support Apple Silicon ARM64.
- python-version: "3.5"
os: macos-latest
Expand All @@ -37,7 +37,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Run tests in Docker for legacy Python
if: matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)
run: |
docker run --rm -v ${{ github.workspace }}:/app -w /app python:${{ matrix.python-version }} bash -c "
pip install --upgrade pip &&
pip install pytest pytest-cov parameterized mock flake8 &&
pip install -r requirements.txt &&
flake8 configcatclient --count --show-source --statistics &&
pytest configcatclienttests
"

- name: Set up Python ${{ matrix.python-version }}
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -46,25 +58,29 @@ jobs:
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"

- name: Install dependencies
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov parameterized mock flake8
pip install -r requirements.txt

- name: Lint with flake8
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
run: |
# Statical analysis
flake8 configcatclient --count --show-source --statistics

- name: Test
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
run: pytest configcatclienttests


coverage:
needs: [ test ]
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
Loading