forked from octue/generate-pull-request-description
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.33 KB
/
python-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This workflow will install the Python dependencies and run the tests.
name: python-ci
on:
push:
branches-ignore:
- main
jobs:
check-semantic-version:
if: "!contains(github.event.head_commit.message, 'skipci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Set fetch-depth to 0 to fetch all tags (necessary for git-mkver to determine the correct semantic version).
fetch-depth: 0
- uses: octue/conventional-commits/[email protected]
with:
version_source_type: pyproject.toml
tests:
if: "!contains(github.event.head_commit.message, 'skipci')"
runs-on: ubuntu-latest
env:
USING_COVERAGE: '3.10'
strategy:
matrix:
python: ['3.10']
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install tox
run: pip install tox
- name: Run tests
run: tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}