Skip to content

Commit 29bb729

Browse files
authored
ci(release): trim the fat, split out test run (purely for coverage) in separate workflow (#2626)
1 parent d8ba283 commit 29bb729

2 files changed

Lines changed: 37 additions & 25 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: coverage-master
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
upload_coverage:
11+
runs-on: windows-latest
12+
environment: CI
13+
steps:
14+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
15+
- uses: ./.github/actions/setup
16+
with:
17+
extras: "-E all"
18+
19+
- name: Test full
20+
env:
21+
LOGIN_FLOW: client_credentials
22+
COGNITE_CLIENT_SECRET: ${{ secrets.IDP_CLIENT_SECRET_CI }}
23+
COGNITE_TOKEN_URL: https://login.microsoftonline.com/cognitepysdk.onmicrosoft.com/oauth2/v2.0/token
24+
COGNITE_TOKEN_SCOPES: ${{ vars.CDF_BASE_URL_CI }}/.default
25+
COGNITE_CLIENT_ID: ${{ vars.IDP_CLIENT_ID_CI }}
26+
COGNITE_PROJECT: ${{ vars.CDF_PROJECT_CI }}
27+
COGNITE_BASE_URL: ${{ vars.CDF_BASE_URL_CI }}
28+
COGNITE_CLIENT_NAME: python-sdk-integration-tests
29+
# Testpaths are defined in the pytest.ini file:
30+
run: pytest --durations=10 --cov --cov-report term --cov-report xml:coverage.xml -n8 --dist loadscope --reruns 2 --maxfail 20
31+
32+
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5
33+
with:
34+
token: ${{ secrets.CODECOV_TOKEN }}
35+
file: ./coverage.xml

.github/workflows/release.yaml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,16 @@ on:
77
- master
88

99
jobs:
10-
test_full_build_and_release:
11-
runs-on: windows-latest
10+
build_and_release:
11+
runs-on: ubuntu-latest
1212
environment: CD
1313
steps:
1414
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
1515
- uses: ./.github/actions/setup
16-
with:
17-
extras: '-E all'
18-
19-
- name: Test full
20-
env:
21-
LOGIN_FLOW: client_credentials
22-
COGNITE_CLIENT_SECRET: ${{ secrets.IDP_CLIENT_SECRET_CD }}
23-
COGNITE_TOKEN_URL: https://login.microsoftonline.com/cognitepysdk.onmicrosoft.com/oauth2/v2.0/token
24-
COGNITE_TOKEN_SCOPES: ${{ vars.CDF_BASE_URL_CD }}/.default
25-
COGNITE_CLIENT_ID: ${{ vars.IDP_CLIENT_ID_CD }}
26-
COGNITE_PROJECT: ${{ vars.CDF_PROJECT_CD }}
27-
COGNITE_BASE_URL: ${{ vars.CDF_BASE_URL_CD }}
28-
COGNITE_CLIENT_NAME: python-sdk-integration-tests
29-
# Testpaths are defined in the pytest.ini file:
30-
run: pytest --durations=10 --cov --cov-report term --cov-report xml:coverage.xml -n8 --dist loadscope --reruns 2 --maxfail 20
31-
32-
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5
33-
with:
34-
token: ${{ secrets.CODECOV_TOKEN }}
35-
file: ./coverage.xml
3616

3717
- name: Build package
3818
run: poetry build
3919

40-
- name: Build docs
41-
run: cd docs && make html
42-
4320
- name: Release to PyPI
4421
env:
4522
TWINE_USERNAME: __token__

0 commit comments

Comments
 (0)