Skip to content

Commit

Permalink
Test action on different python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pgoslatara committed Jul 18, 2024
1 parent 5677eb9 commit 5796a58
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,24 @@ jobs:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Run action
uses: ./
Expand Down Expand Up @@ -212,7 +224,7 @@ jobs:
run: poetry install --no-interaction --no-ansi

- name: Build pex file
run: poetry run pex . -c dbt-bouncer -o ./dist/dbt-bouncer.pex
run: make build-pex

- name: Test pex file
run: ./dist/dbt-bouncer.pex --dbt-artifacts-dir dbt_project/target
2 changes: 1 addition & 1 deletion .github/workflows/release_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
run: poetry install

- name: Build pex file
run: poetry run pex . -c dbt-bouncer -o ./dist/dbt-bouncer.pex
run: make build-pex

- name: Save version to env var
id: version
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ repos:
- repo: local
hooks:
- id: build-pex
entry: poetry
args: ['run', 'pex', '.', '-c', 'dbt-bouncer', '-o', './dist/dbt-bouncer.pex']
entry: make
args: ['build-pex' ]
language: system
name: Build .pex
pass_filenames: false
Binary file modified dist/dbt-bouncer.pex
Binary file not shown.
3 changes: 3 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
build-pex:
poetry run pex . -c dbt-bouncer -o ./dist/dbt-bouncer.pex --python-shebang='/usr/bin/env python'

test:
poetry run pytest --junitxml=coverage.xml --cov-report=term-missing:skip-covered --cov=dbt_bouncer/ ./tests --numprocesses 5

0 comments on commit 5796a58

Please sign in to comment.