Skip to content

Commit

Permalink
[CI] Fix Python2 tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Juri Berlanda <[email protected]>
  • Loading branch information
j-be committed Jun 24, 2023
1 parent 28b208b commit a5febde
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,23 @@ on:
push:

jobs:
test:
name: Run Tests
test-python3:
name: Run Tests on Python 3

runs-on: ubuntu-latest
timeout-minutes: 3

strategy:
matrix:
python-version:
- '3.x'
- '2.7'

steps:

- name: Check out the code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Select Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: '3.x'

- name: Install dependencies
run: pip install --upgrade octoprint pytest coverage
Expand All @@ -47,3 +41,25 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

test-python2:
name: Run Tests on Python 2

runs-on: ubuntu-latest
container:
image: python:2.7.18-buster

timeout-minutes: 3

steps:

- name: Check out the code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Install dependencies
run: pip install --upgrade octoprint pytest coverage

- name: Run tests
run: pytest

0 comments on commit a5febde

Please sign in to comment.