angers_models_run #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: angers_models_run | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 5 * * *' | |
env: | |
DBNAME: ${{ secrets.ANGERS_DBNAME_PROD }} | |
HOST: ${{ secrets.HOST }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
PORT: ${{ secrets.PORT }} | |
TARGET_SCHEMA: ${{ secrets.SCHEMA_PROD }} | |
USER: ${{ secrets.USER }} | |
PARTICIPATION_HOST_NAME: ${{ secrets.ANGERS_PARTICIPATION_HOST_NAME }} | |
WORKING_DIRECTORY: ./projects/angers | |
jobs: | |
angers_models_run: | |
name: angers_models_run | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ env.WORKING_DIRECTORY }} | |
steps: | |
- name: Check out | |
uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12.x" | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
dbt deps --target prod | |
- name: Run dbt models | |
run: dbt run --target prod | |
- name: Test dbt models | |
run: dbt test --target prod | |