Skip to content

Commit

Permalink
Refactor github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bergercookie committed Aug 10, 2024
1 parent 2f0abd9 commit 3c3717b
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 63 deletions.
63 changes: 0 additions & 63 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,69 +3,6 @@ on:
push:
pull_request:
jobs:
install_with_pip3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install with pip3 - no extras
run: |
pip3 install .
pip3 show syncall
- name: Install with pip3 - all extras
run: |
pip3 install .[tw,google,notion,gkeep,asana,caldav]
pip3 show syncall
- name: Install with pip3 - tw
run: |
pip3 install .[tw]
pip3 show syncall
- name: Install with pip3 - google
run: |
pip3 install .[google]
pip3 show syncall
- name: Install with pip3 - notion
run: |
pip3 install .[notion]
pip3 show syncall
- name: Install with pip3 - gkeep
run: |
pip3 install .[gkeep]
pip3 show syncall
- name: Install with pip3 - asana
run: |
pip3 install .[asana]
pip3 show syncall
- name: Install with pip3 - caldav
run: |
pip3 install .[caldav]
pip3 show syncall
unittests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Python Poetry Action
uses: abatilo/[email protected]
with:
poetry-version: "1.6.1"
- name: Install prerequisites
run: |
sudo ./scripts/install-taskwarrior.sh
poetry install --all-extras
poetry self add "poetry-dynamic-versioning[plugin]"
task --version
- name: Run tests
run: poetry run pytest
style_and_linters:
runs-on: ubuntu-latest
steps:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/install-software.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI
on:
push:
pull_request:
jobs:
install_main_only_with_pip3:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install with pip3 - no extras
run: |
pip3 install .
pip3 show syncall
install_extras_with_pip3:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
# use python-extra AND executable to tests its imports
# https://stackoverflow.com/questions/66025220/paired-values-in-github-actions-matrix
python-extra:
[
"tw,google,notion,gkeep,asana,caldav",
"tw",
"google",
"notion",
"gkeep",
"asana",
"caldav",
]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install with pip3 - with ${{ matrix.python-extra }}
run: |
pip install .[${{ matrix.python-extra }}]
pip3 show syncall
29 changes: 29 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tests
on:
push:
pull_request:
jobs:
unittests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Python Poetry Action
uses: abatilo/[email protected]
with:
poetry-version: "1.6.1"
- name: Install prerequisites
run: |
sudo ./scripts/install-taskwarrior.sh
poetry install --all-extras
poetry self add "poetry-dynamic-versioning[plugin]"
task --version
- name: Run tests
run: poetry run pytest

0 comments on commit 3c3717b

Please sign in to comment.