Skip to content

Commit

Permalink
Testing the matrix options in dev before setting up for master
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-tmathew committed May 6, 2024
1 parent 5682aa6 commit ac2b6e6
Showing 1 changed file with 12 additions and 37 deletions.
49 changes: 12 additions & 37 deletions .github/workflows/dev-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ on:

jobs:
build:
strategy:
fail-fast: false
matrix:
scenario-name: [ 'basics_demo', 'citibike_demo', 'citibike_demo_jinja']
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
env:
SNOWFLAKE_PASSWORD: ${{ secrets.SCHEMACHANGE_SNOWFLAKE_PASSWORD }}
SNOWFLAKE_USER: ${{ secrets.SCHEMACHANGE_SNOWFLAKE_USER }}
Expand All @@ -23,19 +30,14 @@ jobs:
#SNOWFLAKE_CONNECTIONS_MYCONNECTION_PASSWORD: ${{ secrets.SCHEMACHANGE_SNOWFLAKE_PASSWORD }}
#SNOWFLAKE_CONNECTIONS_MYCONNECTION_ACCOUNT: ${{ secrets.SCHEMACHANGE_SNOWFLAKE_ACCOUNT }}
#SNOWFLAKE_CONNECTIONS_MYCONNECTION_USER: ${{ secrets.SCHEMACHANGE_SNOWFLAKE_USER }}
SCHEMACHANGE_BUILD_ID: ${{ github.run_id }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scenario-name: [ 'basics_demo', 'citibike_demo', 'citibike_demo_jinja']
SCHEMACHANGE_BUILD_ID: ${{ github.run_number }}_${{ strategy.job-index }}

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}
- name: Update pip
run: |
python -m pip install --upgrade pip
Expand All @@ -45,24 +47,6 @@ jobs:
- name: Test with pytest
run: |
pytest
#- name: Setup SnowCLI connection file
# run: |
# echo "[connections]" > config.toml
# echo "[connections.myconnection]" >> config.toml
# chmod 0600 config.toml
#- name: Install snowcli
# run: |
# pip install snowflake-cli-labs
#- name: Test Default snowcli connection
# run: |
# snow --version
# echo "::group::Config Contents"
# more config.toml
# echo "::endgroup::"
# snow --config-file config.toml connection test -c myconnection
# echo "Tested SnowCLI connection successfully!"
# echo "Set default connection"
# snow --config-file config.toml connection set-default "myconnection"
- name: Test Schemachange - ${{ matrix.scenario-name }}
env:
SCENARIO_NAME: ${{ matrix.scenario-name }}
Expand All @@ -71,21 +55,12 @@ jobs:
echo "::group::Setting up ${MY_TARGET_SCHEMA}"
schemachange --config-folder ./demo/setup/${SCENARIO_NAME}
echo "::endgroup::"
echo "Testing Rendering to ${MY_TARGET_SCHEMA}"
echo "::group::Testing Rendering to ${MY_TARGET_SCHEMA}"
echo "Work in Progress - To be Tested"
echo "::endgroup::"
echo "::group::Testing Deployment using ${MY_TARGET_SCHEMA}"
schemachange --config-folder ./demo/${SCENARIO_NAME}
echo "::endgroup::"
echo "::group::Tearing down up ${MY_TARGET_SCHEMA}"
schemachange --config-folder ./demo/teardown/${SCENARIO_NAME}
echo "::endgroup::"
#- name: Test Citibike Demo
# run: |
# snow --config-file config.toml sql -f ./demo/setup/setup_citibike_demo.sql
# schemachange --config-folder ./demo/citibike
# snow --config-file config.toml sql -f ./demo/teardown/teardown_citibike_demo.sql
#- name: Test Citibike Demo Jinja Template
# run: |
# snow --config-file config.toml sql -f ./demo/setup/setup_citibike_demo_jinja.sql
# schemachange --config-folder ./demo/citibike_jinja
# snow --config-file config.toml sql -f ./demo/teardown/teardown_citibike_demo_jinja.sql

0 comments on commit ac2b6e6

Please sign in to comment.