Skip to content

Commit

Permalink
Merge pull request #9 from wimglenn/ci
Browse files Browse the repository at this point in the history
test 2.7 in container
  • Loading branch information
wimglenn authored Aug 28, 2023
2 parents 7869116 + 6467429 commit 3f932d3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
42 changes: 33 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: tests

on:
push:
branches: ["master"]
branches: ["main"]
pull_request:
branches: ["master"]
branches: ["main"]
workflow_dispatch:

jobs:
Expand All @@ -14,16 +14,40 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["2.7", "3.10"]
pytest-version: ["< 7", ""]
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
- uses: "actions/checkout@v3"

- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install ${{ matrix.pytest-version }}"
run: "python -m pip install 'pytest${{ matrix.pytest-version }}'"

- name: "Install pytest"
run: pip install pytest

- name: "Run tests for ${{ matrix.python-version }} on ${{ matrix.os }}"
run: python -m pytest

tests-27:
name: "Python 2.7 on ubuntu-20.04"
runs-on: ubuntu-20.04
container:
image: python:2.7-buster

steps:
- uses: "actions/checkout@v3"
- name: "Install pytest"
run: pip install pytest

- name: "Run tests for Python 2.7 on ubuntu-20.04"
run: python -m pytest
2 changes: 1 addition & 1 deletion tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ def test_name_error_instance():
if sys.version_info < (3,):
txt = "E * AssertionError: Pattern '2101' not found in 'somebody set up us the bomb'"
else:
txt = "E * AssertionError: Regex pattern '2101' does not match 'somebody set up us the bomb'."
txt = "E * AssertionError: Regex pattern did not match."
result.stdout.fnmatch_lines([txt])

0 comments on commit 3f932d3

Please sign in to comment.