Skip to content

Testing dbt-bouncer action #59

Testing dbt-bouncer action

Testing dbt-bouncer action #59

Workflow file for this run

---
name: CI pipeline
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
IMAGE_NAME: ${{ github.repository }}
POETRY_VERSION: "1.7.1"
REGISTRY: ghcr.io
jobs:
dbt-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
id: setup-python
uses: actions/setup-python@v5
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v4
with:
path: /home/runner/.local
key: poetry-cache-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ env.POETRY_VERSION }}
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
installer-parallel: true
version: ${{ env.POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-ansi
- run: poetry run dbt parse
working-directory: ./dbt_project
- uses: godatadriven/dbt-bouncer@v0
with:
dbt-project-dir: ./dbt_project
- run: echo '${{ secrets.PAT_GITHUB }}' | docker login ghcr.io -u pgoslatara --password-stdin
- run: docker pull ghcr.io/godatadriven/dbt-bouncer:v0
- run: >
docker run --rm \
--volume "$PWD/dbt_project":/dbt_project \
ghcr.io/godatadriven/dbt-bouncer:v0 \
dbt-bouncer --dbt-project-dir dbt_project