mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-11-19 01:30:29 +00:00
- Updated mirror selection - Removed built-in mirror options, users must provide their own configurations - Set Universal search to default, added ability to disable direct source - Updated documentation - Updated makefile
159 lines
4.1 KiB
YAML
159 lines
4.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
python-quality:
|
|
name: Python Quality
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install uv and Python
|
|
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
|
|
with:
|
|
version: "0.11.3"
|
|
python-version: "3.14"
|
|
enable-cache: true
|
|
|
|
- name: Sync dependencies
|
|
run: make install-python-dev
|
|
|
|
- name: Lint
|
|
run: make python-lint
|
|
|
|
- name: Check formatting
|
|
run: make python-format
|
|
|
|
- name: Check dead code
|
|
run: make python-dead-code
|
|
|
|
python-typechecks:
|
|
name: Python Typechecks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install uv and Python
|
|
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
|
|
with:
|
|
version: "0.11.3"
|
|
python-version: "3.14"
|
|
enable-cache: true
|
|
|
|
- name: Sync dependencies
|
|
run: make install-python-dev
|
|
|
|
- name: Typecheck
|
|
run: make python-typecheck
|
|
|
|
python-tests:
|
|
name: Python Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install uv and Python
|
|
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
|
|
with:
|
|
version: "0.11.3"
|
|
python-version: "3.14"
|
|
enable-cache: true
|
|
|
|
- name: Sync dependencies
|
|
run: make install-python-dev
|
|
|
|
- name: Run tests
|
|
run: make python-test
|
|
|
|
docker-build-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
|
|
|
- name: Build shelfmark-lite image
|
|
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
|
with:
|
|
context: .
|
|
target: shelfmark-lite
|
|
platforms: linux/amd64
|
|
push: false
|
|
build-args: |
|
|
BUILD_VERSION=pr-${{ github.sha }}
|
|
RELEASE_VERSION=pr-${{ github.event.pull_request.number }}
|
|
|
|
frontend-quality:
|
|
name: Frontend Quality
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: 24
|
|
cache: "npm"
|
|
cache-dependency-path: src/frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: make install-ci
|
|
|
|
- name: Lint
|
|
run: make frontend-lint
|
|
|
|
- name: Check formatting
|
|
run: make frontend-format
|
|
|
|
frontend-typechecks:
|
|
name: Frontend Typechecks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: 24
|
|
cache: "npm"
|
|
cache-dependency-path: src/frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: make install-ci
|
|
|
|
- name: Typecheck
|
|
run: make frontend-typecheck
|
|
|
|
frontend-tests:
|
|
name: Frontend Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: 24
|
|
cache: "npm"
|
|
cache-dependency-path: src/frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: make install-ci
|
|
|
|
- name: Unit tests
|
|
run: make frontend-test
|