-
Notifications
You must be signed in to change notification settings - Fork 37
92 lines (82 loc) · 3.14 KB
/
Copy pathbuild.yml
File metadata and controls
92 lines (82 loc) · 3.14 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
name: build
on:
merge_group:
pull_request:
concurrency:
group: pr-${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/setup
with:
extras: "-E pandas"
- name: Linting and static code checks
run: pre-commit run --all-files --show-diff-on-failure
verify-sync-codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/setup
with:
extras: "-E pandas"
- name: Ensures sync code is up-to-date, with no stale files
run: python scripts/sync_client_codegen/main.py verify
build_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/setup
- name: Run docs linkcheck
working-directory: ./docs
run: make linkcheck SPHINXOPTS="-W"
- name: Build docs
working-directory: ./docs
run: make html SPHINXOPTS="-W"
build_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/setup
- name: Build package
run: poetry build
test_core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/setup
- name: Test core
run: pytest tests/tests_unit -n6 --dist loadscope --maxfail 10 -m 'not dsl' --test-deps-only-core
test_full:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/setup
with:
python_version: ${{ matrix.python-version }}
extras: "-E all"
- name: Test full
env:
LOGIN_FLOW: client_credentials
COGNITE_CLIENT_SECRET: ${{ secrets.IDP_CLIENT_SECRET_CI }}
COGNITE_TOKEN_URL: https://login.microsoftonline.com/cognitepysdk.onmicrosoft.com/oauth2/v2.0/token
COGNITE_TOKEN_SCOPES: ${{ vars.CDF_BASE_URL_CI }}/.default
COGNITE_CLIENT_ID: ${{ vars.IDP_CLIENT_ID_CI }}
COGNITE_PROJECT: ${{ vars.CDF_PROJECT_CI }}
COGNITE_BASE_URL: ${{ vars.CDF_BASE_URL_CI }}
COGNITE_CLIENT_NAME: python-sdk-integration-tests
# Testpaths are defined in the pytest.ini file:
run: pytest --durations=10 --cov --cov-report term --cov-report xml:coverage.xml -n8 --dist loadscope --reruns 2 --maxfail 20
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
# Report code coverage from windows runner; xdist + ubuntu gives incorrect results
if: matrix.os == 'windows-latest' && matrix.python-version == '3.10'
with:
token: ${{ secrets.CODECOV_TOKEN }}