Skip to content

Commit

Permalink
Merge pull request #7 from Isaak-Malers/6-CI-AllPythonVersions
Browse files Browse the repository at this point in the history
6 ci all python versions
  • Loading branch information
Isaak-Malers authored Feb 22, 2024
2 parents 0a6bbd7 + 71a468c commit 99288bc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,29 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install -r requirements-dev.txt
- name: Run pytest
run: |
pytest ./test --junitxml=./test/results.xml
pytest ./test --junitxml=./test/results-${{ matrix.python-version }}.xml
- name: Archive test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: ./test/results.xml
name: test-results-${{ matrix.python-version }}
path: ./test/results-${{ matrix.python-version }}.xml
15 changes: 15 additions & 0 deletions test/test_canary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import sys
import pytest


class TestCanary:

@pytest.mark.skip(reason="This test is a canary for verifying CI works as intended.")
def test_python_version(self):
version = sys.version
if sys.version.startswith("3.8"):
assert True is False

@pytest.mark.skip(reason="This test is a canary for verifying CI works as intended.")
def test_fail(self):
assert True is False

0 comments on commit 99288bc

Please sign in to comment.