-
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (34 loc) · 1.09 KB
/
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 RUVNL Consumer App
on: push
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@v4
- name: Install poetry
run: pipx install poetry==1.7.1
- name: Install python
uses: actions/setup-python@v5
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=ruvnl_consumer_app --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
release:
needs: [lint_and_test]
if: github.ref_name == 'main'
uses: openclimatefix/.github/.github/workflows/docker-release.yml@v1.8.1
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
image_base_name: ruvnl_consumer_app