Skip to content

Commit 32c1bf0

Browse files
committed
pypi release workflow
1 parent 9848b38 commit 32c1bf0

File tree

2 files changed

+22
-30
lines changed

2 files changed

+22
-30
lines changed

.github/workflows/build-release.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,32 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
1013

1114
steps:
12-
- name: Repo checkout
13-
uses: actions/checkout@v4
15+
- uses: actions/checkout@v4
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -r requirements.txt
24+
pip install -r test-requirements.txt
25+
- name: Test with pytest
26+
run: |
27+
pytest --cov=hostinger-api
1428
15-
- name: Composer install
16-
uses: php-actions/composer@v6
29+
release:
30+
runs-on: ubuntu-latest
31+
needs: [build]
1732

18-
- name: PHPStan check
19-
uses: php-actions/phpstan@v3
20-
with:
21-
path: src/
33+
steps:
34+
- name: Repo checkout
35+
uses: actions/checkout@v4
2236

2337
- name: Bump version and push tag
2438
id: bump

.github/workflows/publish-release.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,7 @@ on:
55
types: [released]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
13-
14-
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: ${{ matrix.python-version }}
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install -r requirements.txt
24-
pip install -r test-requirements.txt
25-
- name: Test with pytest
26-
run: |
27-
pytest --cov=hostinger-api
28-
298
pypi:
30-
needs: [build]
319
runs-on: ubuntu-latest
3210
permissions:
3311
id-token: write

0 commit comments

Comments
 (0)