Skip to content

Cookbook 3: Validate data with GX Core and GX Cloud #62

Cookbook 3: Validate data with GX Core and GX Cloud

Cookbook 3: Validate data with GX Core and GX Cloud #62

Workflow file for this run

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---