Skip to content

Commit

Permalink
chore: fix up workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ms7m committed May 23, 2021
1 parent 43bd4c7 commit 1d532f3
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 59 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build Wheels + Publish to PyPi

on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python to Build Wheel
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Build and publish to PyPi
uses: JRubics/poetry-publish@v1
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
ignore_dev_requirements: "yes"
21 changes: 9 additions & 12 deletions .github/workflows/test_black_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,22 @@ name: Test For Black Formatting
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Test Black Formatting
run: |
pip install black
python -m black --check notifypy/
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Test Black Formatting
run: |
pip install black
python -m black --check notifypy/
13 changes: 7 additions & 6 deletions .github/workflows/test_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ name: Test Linux
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
Expand All @@ -28,15 +26,18 @@ jobs:
pip install loguru jeepney pytest
sudo apt-get install libnotify-bin
sudo apt-get install alsa
sudo apt-get install curl
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
exec $SHELL
poetry install
- name: Lint with pylint
run: |
pip install pylint
# stop the build if there are Python syntax errors or undefined names
pylint --errors-only notifypy/
poetry run pylint --errors-only notifypy/
- name: Test with pytest (Linux dbus)
run: |
dbus-run-session -- python -m pytest tests/
dbus-run-session -- poetry run pytest tests/
- name: Test with pytest (Linux Libnotify)
run: |
pip uninstall jeepney -y
python -m pytest tests/
poetry run pytest tests/
38 changes: 18 additions & 20 deletions .github/workflows/test_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,31 @@ name: Test macOS
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
pip install loguru
- name: Lint with pylint
run: |
pip install pylint
# stop the build if there are Python syntax errors or undefined names
pylint --errors-only notifypy/
- name: Test with pytest
run: |
pip install pytest
python -m pytest tests/
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
exec $SHELL
- name: Lint with pylint
run: |
pip install pylint
# 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
poetry run pytest tests/
38 changes: 18 additions & 20 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,31 @@ name: Test Windows
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
pip install loguru
- name: Lint with pylint
run: |
pip install pylint
# stop the build if there are Python syntax errors or undefined names
pylint --errors-only notifypy/
- name: Test with pytest
run: |
pip install pytest
python -m pytest tests/
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
pipx install poetry
poetry install
- name: Lint with pylint
run: |
pip install pylint
# 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
poetry run pytest tests/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,5 @@ dmypy.json
cython_debug/

# PyCharm
.idea/
.idea/
dist/*

0 comments on commit 1d532f3

Please sign in to comment.