Skip to content

Commit

Permalink
remove formatting diffs for a more readable PR
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Oct 9, 2024
1 parent 0f5301f commit 1b4b7ea
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 35 deletions.
39 changes: 9 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,36 @@
name: "CI"
name: ci
run-name: "CI - ${{ github.event_name }} - ${{ github.actor }}"

on:
pull_request:
push:
branches: [main]
workflow_dispatch:
inputs:
branch:
description: "The branch to run CI against"
type: string
default: "main"

jobs:
code-quality:
name: "Pre-commit checks"
pre-commit:
name: 'Pre-commit checks'
runs-on: ubuntu-latest
steps:
- name: "Checkout repo - PR"
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
uses: actions/checkout@v3
- name: "Checkout repo - Dispatch"
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- uses: actions/checkout@v3
- name: "Setup `hatch`"
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
with:
python-version: '3.11'
- name: "Run code quality"
uses: pre-commit/[email protected]
- uses: pre-commit/[email protected]

unit-tests:
name: "Unit tests"
unit_test:
name: 'Unit tests with coverage'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: "Checkout repo - PR"
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
uses: actions/checkout@v3
- name: "Checkout repo - Dispatch"
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- uses: actions/checkout@v3
- name: "Setup `hatch`"
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
with:
python-version: ${{ matrix.python-version }}
- name: "Run unit tests"
- name: Test with pytest
run: hatch run unit-tests
working-directory: ./dbt-athena
11 changes: 6 additions & 5 deletions .github/workflows/functional-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
checkout-ref:
required: true
type: string
checkout-repository:
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}
cancel-in-progress: true
Expand All @@ -33,18 +36,16 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}

repository: ${{ inputs.checkout-repository }}
- name: "Setup `hatch`"
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
with:
python-version: ${{ matrix.python-version }}

- name: "Configure AWS credentials from Test account"
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.ASSUMABLE_ROLE_NAME }}
aws-region: ${{ vars.DBT_TEST_ATHENA_REGION_NAME }}

- name: "Functional Test"
- name: Functional Test
run: hatch run integration-tests
working-directory: ./dbt-athena
4 changes: 4 additions & 0 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
checkout-ref:
required: true
type: string
checkout-repository:
required: true
type: string

jobs:
# workflow that is invoked when for PRs with labels 'enable-functional-tests'
Expand Down Expand Up @@ -40,3 +43,4 @@ jobs:
contents: read
with:
checkout-ref: ${{ github.ref }}
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }}
Empty file removed dbt-athena/tests/unit/__init__.py
Empty file.

0 comments on commit 1b4b7ea

Please sign in to comment.