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

fix: reduce duplication of setup process #7

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 5 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -7,24 +7,18 @@ on:
workflow_dispatch:

jobs:
setup:
uses: ./.github/workflows/setup.yml

build:
needs:
- setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: 3.x

- name: "Configure git"
run: |
git config user.name "CICD"
git config user.email "cicd@github.com"

- name: "Install dependencies"
run: |
make init-uv
make install

- name: "Build mkdocs"
run: make doc-deploy
20 changes: 20 additions & 0 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Setup

on:
workflow_call:

jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
make init-uv
make install
73 changes: 13 additions & 60 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -8,96 +8,49 @@ on:
- develop

jobs:
setup:
uses: ./.github/workflows/setup.yml

format:
needs:
- setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
make init-uv
make install

- name: Format checking with Ruff Format
run: make format

lint:
needs:
- setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
make init-uv
make install

- name: Lint with Ruff
run: make lint-python

- name: Lint with Sqlfluff
run: make lint-sql

type-check:
needs:
- setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
make init-uv
make install

- name: Type checking with Mypy
run: make type

test:
needs:
- setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
make init-uv
make install

- name: Test with pytest
run: make test

build:
needs:
- setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
make init-uv
make install

- name: Verify build
run: make build

Loading