Skip to content

Merge pull request #253 from Open-Factory-Initiative/task/issue-240-r… #229

Merge pull request #253 from Open-Factory-Initiative/task/issue-240-r…

Merge pull request #253 from Open-Factory-Initiative/task/issue-240-r… #229

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
repository-hygiene:
name: Repository hygiene
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Show tracked repository files
run: find . -maxdepth 3 -type f | sort
backend-tests:
name: Backend lint, typecheck, and tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements-dev.txt
- name: Install backend dependencies with make setup
run: make setup
- name: Run lint with make lint
run: make lint
- name: Run type/syntax checks with make typecheck
run: make typecheck
- name: Run tests with make test
run: make test
frontend-tests:
name: Frontend tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Run frontend tests if configured
run: |
if [ -f "apps/web/package.json" ]; then
cd apps/web
npm ci
npm run lint --if-present
npm run typecheck --if-present
npm test --if-present
else
echo "No frontend app yet."
fi