Skip to content

Commit

Permalink
point workflows to shared actions in dbt-adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Jan 26, 2024
1 parent a45563e commit 087579e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 103 deletions.
25 changes: 0 additions & 25 deletions .github/actions/publish-results/action.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Code Quality

on:
push:
branches:
- "main"
- "*.latest"
pull_request:
workflow_dispatch:

permissions: read-all

# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
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

jobs:
code-quality:
uses: dbt-labs/dbt-adapters/.github/workflows/code-quality.yml@main
6 changes: 3 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
with:
persist-credentials: false

- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Setup `hatch`
uses: ./.github/actions/setup-hatch
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -53,7 +53,7 @@ jobs:
shell: bash

- name: Publish results
uses: ./.github/actions/publish-results
uses: dbt-labs/dbt-adapters/.github/actions/publish-results.yml@main
if: always()
with:
source-file: "results.csv"
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/lint.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,12 @@ on:

permissions: read-all

defaults:
run:
shell: bash

# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}-${{ inputs.deploy-to }}
cancel-in-progress: true

jobs:

release:
name: PyPI - ${{ inputs.deploy-to }}
runs-on: ubuntu-latest
Expand Down
31 changes: 1 addition & 30 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,4 @@ concurrency:

jobs:
unit:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup environment
uses: ./.github/actions/setup-environment
with:
python-version: ${{ matrix.python-version }}

- name: Run unit tests
run: hatch run unit-tests:all
shell: bash

- name: Publish results
uses: ./.github/actions/publish-results
if: always()
with:
source-file: "results.csv"
file-name: "unit_results"
python-version: ${{ matrix.python-version }}
uses: dbt-labs/dbt-adapters/.github/workflows/unit-tests.yml@main

0 comments on commit 087579e

Please sign in to comment.