Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing action across python versions #33

Merged
merged 1 commit into from
Jul 18, 2024
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
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