perfect-postcode/.forgejo/workflows/ci.yml
Andras Schmelczer 0aba73a2a3
Some checks failed
CI / Frontend (lint + typecheck) (push) Successful in 2m14s
CI / Python (lint + test) (push) Successful in 3m28s
CI / Rust (lint + test) (push) Successful in 6m36s
Build and publish Docker image / build-and-push (push) Failing after 10m5s
Try fixing CI
2026-03-24 20:47:51 +00:00

89 lines
1.8 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
jobs:
python:
name: Python (lint + test)
runs-on: docker
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: uv sync
- name: Ruff check
run: uv run ruff check .
- name: Deptry (unused dependencies)
run: uv run deptry .
- name: Tests
run: |
uv run pytest pipeline/utils/test_haversine.py
uv run pytest pipeline/utils/test_poi_counts.py
uv run pytest pipeline/transform/postcode_boundaries/test_postcode_boundaries.py
frontend:
name: Frontend (lint + typecheck)
runs-on: docker
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: ESLint
run: npm run lint
- name: Prettier check
run: npm run format:check
- name: TypeScript typecheck
run: npm run typecheck
rust:
name: Rust (lint + test)
runs-on: docker
defaults:
run:
working-directory: server-rs
steps:
- uses: actions/checkout@v4
- uses: https://github.com/dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Clippy
run: cargo clippy -- -D warnings
- name: Format check
run: cargo fmt --check
- name: Install cargo-machete
run: cargo install cargo-machete
- name: Unused dependencies check
run: cargo machete
- name: Tests
run: cargo test