Skip to content

Commit

Permalink
test: separate integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Peder Meldgaard <[email protected]>
  • Loading branch information
JenspederM committed Dec 28, 2024
1 parent 13a170d commit ed16340
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Integration Tests

on:
workflow_call: {}

jobs:
test:
name: Run tests
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') && github.repository_owner_id == github.actor_id }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
# Download the Databricks CLI.
# See https://github.com/databricks/setup-cli
- uses: databricks/setup-cli@main
- uses: eifinger/setup-rye@v3
id: setup-rye
with:
version: "0.42.0"
- name: Pin python-version ${{ matrix.python-version }}
run: rye pin ${{ matrix.python-version }}
- name: Install dependencies
run: rye sync --no-lock
- name: Lint code
run: rye lint
- name: Run tests
run: |
source .venv/bin/activate
rye test -- -x
env:
DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}
DATABRICKS_CLIENT_ID: ${{ secrets.DATABRICKS_CLIENT_ID }}
DATABRICKS_CLIENT_SECRET: ${{ secrets.DATABRICKS_CLIENT_SECRET }}
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 9 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ on:
- master

jobs:
integration_tests:
name: Integration Tests
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') && github.repository_owner_id == github.actor_id }}
uses:
.github/workflows/integration_tests.yml

# Download the Databricks CLI.
# See
test:
name: Run tests
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
Expand All @@ -31,7 +39,7 @@ jobs:
- name: Run tests
run: |
source .venv/bin/activate
rye test
rye test -- -x
env:
DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}
DATABRICKS_CLIENT_ID: ${{ secrets.DATABRICKS_CLIENT_ID }}
Expand Down

0 comments on commit ed16340

Please sign in to comment.