2026-09-21 15:55:49 +07:00
|
|
|
name: Web CI
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
|
|
|
|
- master
|
2026-09-21 19:41:26 +07:00
|
|
|
tags:
|
|
|
|
|
- "web-*.*.*"
|
2026-09-21 15:55:49 +07:00
|
|
|
paths:
|
2026-09-21 19:41:26 +07:00
|
|
|
- "web/**"
|
|
|
|
|
- "docker-compose.yml"
|
|
|
|
|
- ".forgejo/workflows/web.yml"
|
2026-09-21 15:55:49 +07:00
|
|
|
pull_request:
|
|
|
|
|
paths:
|
2026-09-21 19:41:26 +07:00
|
|
|
- "web/**"
|
|
|
|
|
- "docker-compose.yml"
|
|
|
|
|
- ".forgejo/workflows/web.yml"
|
2026-09-21 15:55:49 +07:00
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build-and-test:
|
|
|
|
|
name: Build and test web app
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
timeout-minutes: 20
|
|
|
|
|
defaults:
|
|
|
|
|
run:
|
|
|
|
|
working-directory: web
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout repository
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Setup Node.js
|
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
|
with:
|
2026-09-21 19:41:26 +07:00
|
|
|
node-version: "20"
|
2026-09-21 15:55:49 +07:00
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: npm install --no-fund --no-audit
|
|
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
|
run: npm run test
|
|
|
|
|
|
|
|
|
|
- name: Build app
|
|
|
|
|
run: npm run build
|