-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.63 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
name: CI test tutorial docker compose setup
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-tutorial-compose-and-code:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Docker compose up
env:
GX_CLOUD_ORGANIZATION_ID: ${{ secrets.GX_CLOUD_ORGANIZATION_ID }}
GX_CLOUD_ACCESS_TOKEN: ${{ secrets.GX_CLOUD_ACCESS_TOKEN }}
run: |
echo ---Starting compose setup---
GX_CLOUD_ORGANIZATION_ID=${GX_CLOUD_ORGANIZATION_ID} GX_CLOUD_ACCESS_TOKEN=${GX_CLOUD_ACCESS_TOKEN} docker compose up --build --detach --wait --wait-timeout 120
echo ---Compose is running---
- name: Run tutorial integration tests
run: |
echo ---Starting tests---
docker exec -t tutorial-gx-in-the-data-pipeline-jupyterlab bash -c 'pytest -v /tests'
echo ---Tests completed---
- name: Run Jupyter notebooks tests
run: |
echo ---Starting Jupyter notebook tests---
docker exec -t tutorial-gx-in-the-data-pipeline-jupyterlab bash -c 'cd /cookbooks && pytest --nbmake Cookbook*.ipynb'
echo ---Jupyter notebook tests completed---
- name: Docker compose down
if: success() || failure()
env:
GX_CLOUD_ORGANIZATION_ID: ${{ secrets.GX_CLOUD_ORGANIZATION_ID }}
GX_CLOUD_ACCESS_TOKEN: ${{ secrets.GX_CLOUD_ACCESS_TOKEN }}
run: |
echo ---Spinning down compose---
GX_CLOUD_ORGANIZATION_ID=${GX_CLOUD_ORGANIZATION_ID} GX_CLOUD_ACCESS_TOKEN=${GX_CLOUD_ACCESS_TOKEN} docker compose down --volumes
echo ---Compose is down---