forked from catherinedevlin/ipython-sql
-
Notifications
You must be signed in to change notification settings - Fork 76
71 lines (58 loc) · 2.33 KB
/
ci-integration-db-live.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
# CI - DB Integration - Cloud is designed to run integration testing against to cloud database
# Target database: Snowflake
# Sqlalchemy version: 1.4 (required by snowflake-sqlalchemy)
# Please aware that if you want to test locally, configure those environment variables: ['SF_USERNAME', 'SF_PASSWORD', 'SF_DATABASE']
name: CI - DB Integration - Cloud
on:
pull_request:
jobs:
database-live-integration-test:
strategy:
matrix:
python-version: ['3.11']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
PLOOMBER_VERSION_CHECK_DISABLED: true
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Environment Vars
id: secret-check
# perform secret check & put boolean result as an output
shell: bash
run: |
if [ "${{ secrets.SF_USERNAME }}" != '' ]; then
echo "available=true" >> $GITHUB_OUTPUT;
else
echo "available=false" >> $GITHUB_OUTPUT;
fi
- name: Set up Python ${{ matrix.python-version }}
if : ${{ steps.secret-check.outputs.available == 'true' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: ${{ steps.secret-check.outputs.available == 'true' }}
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox
nox --session test_integration_cloud --install-only
- name: Integration Test
if: ${{ steps.secret-check.outputs.available == 'true'}}
env:
SF_USERNAME: ${{ secrets.SF_USERNAME }}
SF_PASSWORD: ${{ secrets.SF_PASSWORD }}
SF_DATABASE: ${{ secrets.SF_DATABASE }}
REDSHIFT_HOST: ${{ secrets.REDSHIFT_HOST }}
REDSHIFT_USERNAME: ${{ secrets.REDSHIFT_USERNAME }}
REDSHIFT_PASSWORD: ${{ secrets.REDSHIFT_PASSWORD }}
run: |
nox --session test_integration_cloud --no-install --reuse-existing-virtualenvs
- name: Upload failed images artifacts
uses: actions/upload-artifact@v3
if: failure()
with:
name: failed-image-artifacts-integration-live ${{ matrix.os }} ${{ matrix.python-version }}
path: result_images/