Skip to content

Commit 1cdd254

Browse files
authored
ci: cleanup CI config and update setup (#169)
* ci: Run tests on multiple OS. Use latest action versions. Signed-off-by: Yurii Serhiichuk <[email protected]> * ci: use fixed `pupi-publish` action version and update others. Signed-off-by: Yurii Serhiichuk <[email protected]> * docs: update changelog Signed-off-by: Yurii Serhiichuk <[email protected]> * Upgrade python setup action to the latest v4 Signed-off-by: Yurii Serhiichuk <[email protected]>
1 parent a61b84b commit 1cdd254

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,33 @@ jobs:
77
lint:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
- name: Setup Python
12-
uses: actions/setup-python@v1
12+
uses: actions/setup-python@v4
1313
with:
1414
python-version: '3.10'
15-
- name: Install tox
16-
run: python -m pip install tox
15+
cache: 'pip'
16+
cache-dependency-path: 'requirements/*.txt'
17+
- name: Install dev dependencies
18+
run: python -m pip install -r requirements/dev.txt
1719
- name: Run linting
1820
run: python -m tox -e lint
1921

2022
test:
21-
runs-on: ubuntu-latest
2223
strategy:
2324
matrix:
2425
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
26+
os: [ubuntu-latest, windows-latest, macos-latest]
27+
runs-on: ${{ matrix.os }}
2528
steps:
26-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3
2730
- name: Setup Python
28-
uses: actions/setup-python@v1
31+
uses: actions/setup-python@v4
2932
with:
3033
python-version: ${{ matrix.python }}
31-
- name: Install tox
32-
run: python -m pip install tox
34+
cache: 'pip'
35+
cache-dependency-path: 'requirements/*.txt'
36+
- name: Install dev dependencies
37+
run: python -m pip install -r requirements/dev.txt
3338
- name: Run tests
3439
run: python -m tox -e py # Run tox using the version of Python in `PATH`

.github/workflows/pypi-release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ jobs:
99
build-and-publish:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
- name: Set up Python
14-
uses: actions/setup-python@v1
14+
uses: actions/setup-python@v4
1515
with:
16-
python-version: "3.x"
16+
python-version: "3.10"
17+
cache: 'pip'
1718
- name: Install build dependencies
1819
run: pip install -U setuptools wheel build
1920
- name: Build
2021
run: python -m build .
2122
- name: Publish
22-
uses: pypa/gh-action-pypi-publish@master
23+
uses: pypa/gh-action-pypi-publish@release/v1
2324
with:
2425
password: ${{ secrets.pypi_password }}
2526
- name: Install GitPython and cloudevents for pypi_packaging

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313
- Code quality and styling tooling is unified and configs compatibility is ensured ([#167])
14+
- CI configurations updated and added macOS and Windows tests ([#169])
1415

1516
### Removed
1617
- `docs` folder and related unused tooling ([#168])
@@ -151,3 +152,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
151152
[#165]: https://github.com/cloudevents/sdk-python/pull/165
152153
[#167]: https://github.com/cloudevents/sdk-python/pull/167
153154
[#168]: https://github.com/cloudevents/sdk-python/pull/168
155+
[#169]: https://github.com/cloudevents/sdk-python/pull/169

0 commit comments

Comments
 (0)