Skip to content

Commit

Permalink
Switch CI to uv for proper deps locking
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Nov 1, 2024
1 parent b612462 commit 6ff6342
Show file tree
Hide file tree
Showing 3 changed files with 1,602 additions and 10 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,24 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: pyproject.toml

- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
enable-cache: true

- name: Install dependencies
run: pip install .
run: |
uv sync --locked --all-extras --dev
- name: Lint repository
run: pre-commit run --all-files
run: |
uv run pre-commit run --all-files
- name: Check for bad file extensions
run: invoke check-for-yaml
run: |
uv run invoke check-for-yaml
validate:

Expand All @@ -48,15 +55,20 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: pyproject.toml

- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
enable-cache: true

- name: Install dependencies
run: pip install .
run: |
uv sync --locked --all-extras --dev
- name: Run database ingestion tasks
run: |
invoke validate-entries
uv run invoke validate-entries
build:
runs-on: ubuntu-latest
Expand All @@ -66,6 +78,7 @@ jobs:
with:
fetch-depth: 0
submodules: true

- name: Build image
run: |
docker build . -t datatractor-yard
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ dependencies = [
[project.optional-dependencies]
test = [
"pytest",
"marda-extractors-api[formats] @ git+https://github.com/datatractor/yard.git",
]

dev = [
Expand Down
Loading

0 comments on commit 6ff6342

Please sign in to comment.