-
-
Notifications
You must be signed in to change notification settings - Fork 13
43 lines (34 loc) · 1.01 KB
/
sdk-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
name: CI Pipeline for SDK - Python
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint_and_test:
name: Lint the code and run the tests
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Install poetry
run: pipx install poetry==1.3.2
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: poetry
- name: Install python dependencies
run: poetry install
- name: Lint
run: make lint
- name: Run the tests
run: poetry run pytest --cov=pvsite_datamodel --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
publish:
needs: ["lint_and_test"]
if: github.ref_name == 'main'
uses: openclimatefix/.github/.github/workflows/python-release.yml@main
secrets:
token: ${{ secrets.PYPI_API_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}