Skip to content

Commit

Permalink
add python version to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
geo-martino committed Jan 13, 2024
1 parent a17b4f4 commit a534d0a
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 77 deletions.
153 changes: 78 additions & 75 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,88 +20,91 @@ jobs:
name: Run tests - Windows 🪟
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Windows 🪟
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Windows 🪟

test_linux:
name: Run tests - Linux 🐧
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Linux 🐧
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Linux 🐧

test_mac:
name: Run tests - Mac 🍎
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Mac 🍎
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Run tests
run: |
pytest --junit-xml=test-results.xml
- name: Publish test results report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results - Mac 🍎
4 changes: 3 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.12'

- name: Setup Pages
uses: actions/configure-pages@v4
Expand Down
2 changes: 1 addition & 1 deletion tests/local/playlist/test_m3u.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def test_save_existing_file(
if not os.getenv("GITHUB_ACTIONS"):
# TODO: these assertions always fail on GitHub actions but not locally, why?
assert pl.date_modified > new_dt_modified
assert pl.date_created > original_dt_created
assert pl.date_created > original_dt_created

with open(pl.path, 'r') as f:
paths = [line.strip() for line in f]
Expand Down

0 comments on commit a534d0a

Please sign in to comment.