mirror of
https://github.com/FlipsideCrypto/livequery-base.git
synced 2026-02-06 11:16:44 +00:00
Cleanup Workflows (#42)
This commit is contained in:
parent
0bf8f27edf
commit
db56fe2a31
10
.github/workflows/dbt.yml
vendored
10
.github/workflows/dbt.yml
vendored
@ -3,8 +3,9 @@ on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
warehouse:
|
||||
required: true
|
||||
required: false
|
||||
type: string
|
||||
default: DBT_CLOUD
|
||||
environment:
|
||||
required: true
|
||||
type: string
|
||||
@ -56,3 +57,10 @@ jobs:
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt ${{ inputs.command }}
|
||||
- name: Store logs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: dbt-logs
|
||||
path: |
|
||||
logs
|
||||
target
|
||||
46
.github/workflows/dbt_run_adhoc.yml
vendored
46
.github/workflows/dbt_run_adhoc.yml
vendored
@ -26,46 +26,14 @@ on:
|
||||
description: 'DBT Run Command'
|
||||
required: true
|
||||
|
||||
env:
|
||||
DBT_PROFILES_DIR: ./
|
||||
|
||||
ACCOUNT: "${{ vars.ACCOUNT }}"
|
||||
ROLE: "${{ vars.ROLE }}"
|
||||
USER: "${{ vars.USER }}"
|
||||
PASSWORD: "${{ secrets.PASSWORD }}"
|
||||
REGION: "${{ vars.REGION }}"
|
||||
DATABASE: "${{ vars.DATABASE }}"
|
||||
WAREHOUSE: "${{ inputs.warehouse }}"
|
||||
SCHEMA: "${{ vars.SCHEMA }}"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
jobs:
|
||||
run_dbt_jobs:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: workflow_${{ inputs.environment }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
cache: "pip"
|
||||
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
dbt deps
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt ${{ inputs.dbt_command }}
|
||||
|
||||
- name: Store logs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: dbt-logs
|
||||
path: logs
|
||||
ad_hoc:
|
||||
uses: ./.github/workflows/dbt.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
warehouse: ${{ inputs.warehouse }}
|
||||
environment: workflow_${{ inputs.environment }}
|
||||
command: ${{ inputs.dbt_command }}
|
||||
39
.github/workflows/dbt_run_dev_refresh.yml
vendored
39
.github/workflows/dbt_run_dev_refresh.yml
vendored
@ -7,40 +7,13 @@ on:
|
||||
# Runs "at 9:00 UTC" (see https://crontab.guru)
|
||||
- cron: '0 9 * * *'
|
||||
|
||||
env:
|
||||
DBT_PROFILES_DIR: ./
|
||||
|
||||
ACCOUNT: "${{ vars.ACCOUNT }}"
|
||||
ROLE: "${{ vars.ROLE }}"
|
||||
USER: "${{ vars.USER }}"
|
||||
PASSWORD: "${{ secrets.PASSWORD }}"
|
||||
REGION: "${{ vars.REGION }}"
|
||||
DATABASE: "${{ vars.DATABASE }}"
|
||||
WAREHOUSE: "${{ vars.WAREHOUSE }}"
|
||||
SCHEMA: "${{ vars.SCHEMA }}"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
jobs:
|
||||
run_dbt_jobs:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: workflow_prod
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
cache: "pip"
|
||||
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
dbt deps
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt run-operation run_sp_create_prod_clone
|
||||
dev_refresh:
|
||||
uses: ./.github/workflows/dbt.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
environment: workflow_prod
|
||||
command: run-operation run_sp_create_prod_clone
|
||||
4
.github/workflows/dbt_test.yml
vendored
4
.github/workflows/dbt_test.yml
vendored
@ -27,7 +27,7 @@ concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
jobs:
|
||||
scheduled_job:
|
||||
scheduled:
|
||||
uses: ./.github/workflows/dbt.yml
|
||||
if: github.event_name == 'schedule' || github.event_name == 'push'
|
||||
secrets: inherit
|
||||
@ -36,7 +36,7 @@ jobs:
|
||||
environment: workflow_${{ inputs.environment }}
|
||||
command: test --selector test_udfs
|
||||
|
||||
manual_job:
|
||||
dispached:
|
||||
uses: ./.github/workflows/dbt.yml
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
secrets: inherit
|
||||
|
||||
Loading…
Reference in New Issue
Block a user