Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: LocalStack CI

on:
push:
paths-ignore:
- 'README.md'
branches:
- main
pull_request:
branches:
- main
schedule:
# “At 00:00 on Sunday.”
- cron: "0 0 * * 0"
workflow_dispatch:

jobs:
deploy-snowflake:
name: Deploy to Snowflake emulator
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Snow CLI
run: |
pip install snowflake-cli==3.7.2
snow --version
snow connection add \
--connection-name localstack \
--user test \
--password test \
--account test \
--role test \
--warehouse test \
--database test \
--schema test \
--port 4566 \
--host snowflake.localhost.localstack.cloud \
--no-interactive
snow connection list

- name: Start LocalStack
uses: LocalStack/[email protected]
with:
image-tag: 'latest'
use-pro: 'true'
configuration: LS_LOG=trace
install-awslocal: 'true'
env:
IMAGE_NAME: localstack/snowflake:latest
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}

- name: Install dependencies
run: |
make install

- name: Create Snowflake resources
run: |
make seed

- name: Create AWS resources
run: |
make aws
make upload

- name: Run dbt models
run: |
make dbt

- name: Deploy Native App
run: |
make app

- name: Run tests
run: |
pip3 install pytest
pytest tests/
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ install: ## Install dependencies
@echo "Installing dependencies..."
pip install virtualenv
virtualenv env
bash -c "source env/bin/activate && pip install -r requirements-dev.txt"
bash -c "source env/bin/activate && pip install -r requirements.txt"
bash -c "source env/bin/activate && dbt deps"
@echo "Dependencies installed successfully."

seed: ## Create & Seed the database
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dagster-aws
dagster-dbt
dagster-webserver
snowflake-cli
pytest