-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.44 KB
/
ci-pipeline.yaml
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
56
57
name: CI Pipeline
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
repository_dispatch:
types: [start-scheduled-ci-pipeline]
# disable schedule to prevent GH to disable this workflow
# schedule:
# - cron: '5 5 */14 * *'
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version:
- '3.9' # legacy
- '3.x' # latest
python-package-version:
- 'skip' # use poetry selected version
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: poetry install --with=dev --all-extras
- name: Install specific python package version
if: ${{ matrix.python-package-version != 'skip' }}
run: pip install ${{ matrix.python-package-version }}
- name: Run tests
run: poetry run make tests
- name: Publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/coverage.xml:coverage.py