-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.26 KB
/
ci.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
name: ci
on:
pull_request:
branches: [main]
jobs:
run_linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip poetry==1.2.2
poetry install
- name: Linting
run: |
poetry run pre-commit run --all-files
run_testing:
runs-on: ubuntu-latest
needs: run_linting
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip poetry==1.2.2
poetry install
- name: Run tests
env:
environment: main
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
TENANT_ID: 755f6e58-74f0-4a07-a599-f7479b9669ab
COGNITE_PROJECT: oceandata-dev
CDF_CLUSTER: westeurope-1
run: |
poetry run pytest tests/ -v --cov-report xml:coverage.xml --cov
poetry run coverage xml
- uses: codecov/codecov-action@v3
with:
file: ./coverage.xml