-
Notifications
You must be signed in to change notification settings - Fork 0
148 lines (125 loc) · 4.16 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: CI
on:
pull_request:
jobs:
run-unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run shellcheck
run: ./scripts/build/shellcheck.sh
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: "3.10"
poetry-version: "1.8.2"
- name: Check Version Number
run: poetry run python3 -u "./scripts/build/check_release.py"
- name: Run Unit Tests
run: >
poetry run pytest
--capture=no
--override-ini=log_cli=true
--override-ini=log_cli_level=INFO
test/unit
run-integration-tests:
name: Integration Tests
environment: AWS_CI_TESTS
runs-on: ubuntu-latest
needs: run-unit-tests
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
large-packages: false
- name: Free disk space by removing large directories
run: |
sudo rm -rf /usr/local/graalvm/
sudo rm -rf /usr/local/.ghcup/
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /opt/ghc
- name: Show available disk space
run: df -h
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: "3.10"
poetry-version: "1.8.2"
- name: Run Integration Tests
run: >
poetry run pytest
--capture=no
--override-ini=log_cli=true
--override-ini=log_cli_level=INFO
test/integration
env: # Set the secret as an env variable
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
approval-for-notebook-tests:
name: Run Jupyter Notebook Tests?
runs-on: ubuntu-latest
steps:
- name: Detect Running Notebook Tests
run: true
environment:
approve-test-execution
run-notebook-tests:
name: Jupyter Notebook Tests
environment: AWS_SAGEMAKER
runs-on: ubuntu-latest
needs: approval-for-notebook-tests
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
large-packages: false
- name: Free disk space by removing large directories
run: |
sudo rm -rf /usr/local/graalvm/
sudo rm -rf /usr/local/.ghcup/
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /opt/ghc
- name: Show available disk space
run: df -h
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: "3.10"
poetry-version: "1.8.2"
- name: Run notebook tests
run: >
poetry run pytest
--capture=no
--override-ini=log_cli=true
--override-ini=log_cli_level=INFO
test/notebook_test_runner/test_notebooks_in_dss_docker_image.py
env: # Set the secret as an env variable
NBTEST_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
NBTEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
NBTEST_AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}
gate-2:
name: Gate 2 - Allow Merge
runs-on: ubuntu-latest
needs: [ run-unit-tests, run-integration-tests, run-notebook-tests ]
steps:
- name: Branch Protection
run: true