Skip to content

Commit

Permalink
Fix GitHub Actions workflow following #247 (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut authored and brettcannon committed Dec 17, 2019
1 parent 41d2d0d commit 2a87d1c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -3,9 +3,11 @@ name: Test
on:
pull_request:
paths:
- '.github/workflows/test.yml'
- '**.py'
push:
paths:
- '.github/workflows/test.yml'
- '**.py'

jobs:
Expand All @@ -14,6 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
# Python 3.4 is not available from actions/setup-python@v1.
Expand All @@ -30,19 +33,22 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install coverage<5.0.0 pretend pytest
python -m pip install 'coverage<5.0.0' pretend pytest
shell: bash

- name: Test coverage
run: |
python -m coverage run --source packaging/ -m pytest --strict tests
python -m coverage report -m --fail-under 100
shell: bash


test-pypy:
name: Test ${{ matrix.pypy_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
pypy_version: ['pypy2', 'pypy3']
Expand All @@ -56,13 +62,14 @@ jobs:
python-version: ${{ matrix.pypy_version }}

- name: Install dependencies
# pytest >= 5.0.0 fails with pypy3 https://github.com/pytest-dev/pytest/issues/5807
run: |
python -m pip install --upgrade pip
python -m pip install coverage<5.0.0 pretend pytest==4.6.5
python -m pip install 'coverage<5.0.0' pretend pytest
shell: bash

- name: Test coverage
run: |
python -m pytest --capture=no --strict
python -m coverage run --source packaging/ -m pytest --strict tests
python -m coverage report -m --fail-under 100
shell: bash
2 changes: 1 addition & 1 deletion tests/test_tags.py
Expand Up @@ -804,7 +804,7 @@ def test_windows_cpython(self, mock_interpreter_name, monkeypatch):
monkeypatch.setattr(platform, "system", lambda: "Windows")
monkeypatch.setattr(tags, "_generic_platforms", lambda: ["win_amd64"])
abis = tags._cpython_abis(sys.version_info[:2])
platforms = tags._generic_platforms()
platforms = list(tags._generic_platforms())
result = list(tags.sys_tags())
interpreter = "cp{major}{minor}".format(
major=sys.version_info[0], minor=sys.version_info[1]
Expand Down

0 comments on commit 2a87d1c

Please sign in to comment.