feat: reorder workflow
This commit is contained in:
59
.github/workflows/ci.yml
vendored
59
.github/workflows/ci.yml
vendored
@@ -65,9 +65,9 @@ jobs:
|
|||||||
"**/*.yml" "**/*.yaml" "**/*.md" \
|
"**/*.yml" "**/*.yaml" "**/*.md" \
|
||||||
--ignore-path .prettierignore
|
--ignore-path .prettierignore
|
||||||
|
|
||||||
# Tests
|
# dbt validation
|
||||||
test:
|
validate-dbt:
|
||||||
name: Pytest
|
name: dbt parse
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
@@ -83,12 +83,65 @@ jobs:
|
|||||||
- name: Load environment from .env.example
|
- name: Load environment from .env.example
|
||||||
run: grep -v '^#' .env.example | grep -v '^$' >> "$GITHUB_ENV"
|
run: grep -v '^#' .env.example | grep -v '^$' >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Install dbt packages
|
||||||
|
run: uv run dbt deps --project-dir dbt --profiles-dir dbt
|
||||||
|
|
||||||
|
- name: Validate dbt project
|
||||||
|
run: uv run dbt parse --project-dir dbt --profiles-dir dbt
|
||||||
|
|
||||||
|
# Dagster validation
|
||||||
|
validate-dagster:
|
||||||
|
name: Dagster definitions
|
||||||
|
needs: validate-dbt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: uv sync
|
||||||
|
|
||||||
|
- name: Load environment from .env.example
|
||||||
|
run: grep -v '^#' .env.example | grep -v '^$' >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Install dbt packages
|
||||||
|
run: uv run dbt deps --project-dir dbt --profiles-dir dbt
|
||||||
|
|
||||||
- name: Generate dbt manifest
|
- name: Generate dbt manifest
|
||||||
run: uv run dbt parse --project-dir dbt --profiles-dir dbt
|
run: uv run dbt parse --project-dir dbt --profiles-dir dbt
|
||||||
|
|
||||||
- name: Validate Dagster definitions
|
- name: Validate Dagster definitions
|
||||||
run: uv run dagster definitions validate
|
run: uv run dagster definitions validate
|
||||||
|
|
||||||
|
# Tests
|
||||||
|
test:
|
||||||
|
name: Pytest
|
||||||
|
needs: [validate-dbt, validate-dagster]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: uv sync
|
||||||
|
|
||||||
|
- name: Load environment from .env.example
|
||||||
|
run: grep -v '^#' .env.example | grep -v '^$' >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Install dbt packages
|
||||||
|
run: uv run dbt deps --project-dir dbt --profiles-dir dbt
|
||||||
|
|
||||||
|
- name: Generate dbt manifest
|
||||||
|
run: uv run dbt parse --project-dir dbt --profiles-dir dbt
|
||||||
|
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
run: uv run pytest tests/ --cov=data_platform --cov-report=json:coverage.json
|
run: uv run pytest tests/ --cov=data_platform --cov-report=json:coverage.json
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user