Skip to content

Commit

Permalink
fix(ci): test across all support python versions on all os
Browse files Browse the repository at this point in the history
  • Loading branch information
ms7m committed Dec 4, 2022
1 parent af8ddf6 commit 082a3dc
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 28 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/test_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,36 @@ jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}


- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install libnotify-bin
sudo apt-get install alsa
sudo apt-get install curl
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.2.1"


- name: Install dependencies
run: |
pipx install poetry
poetry install
run: poetry install



- name: Lint with pylint
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/test_linux_dbus.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test Linux
name: Test Linux (dbus)

on:
push:
Expand All @@ -26,34 +26,47 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}


- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install libnotify-bin
sudo apt-get install alsa
sudo apt-get install curl
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.2.1"

- name: Install dependencies
run: |
pipx install poetry
poetry install
run: poetry install

- name: Lint with pylint
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run pylint --errors-only notifypy/
- name: Test with pytest (Linux dbus)
run: |
dbus-run-session -- poetry run pytest tests/
- name: Test with pytest (Linux Libnotify)
run: |
pip uninstall jeepney -y
poetry run pytest tests/
- name: Test building package
run: |
poetry build
26 changes: 19 additions & 7 deletions .github/workflows/test_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,33 @@ on:
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.2.1"


- name: Install dependencies
run: |
pipx install poetry
poetry install
run: poetry install


- name: Lint with pylint
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run pylint --errors-only notifypy/
- name: Test with pytest
run: |
pip install pytest
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,37 @@ on:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.2.1"


- name: Install dependencies
run: |
pipx install poetry
poetry install
- name: Lint with pylint
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run pylint --errors-only notifypy/
- name: Test with pytest
run: |
poetry run pytest tests/
- name: Test building package
run: |
poetry build

0 comments on commit 082a3dc

Please sign in to comment.