mirror of
https://github.com/usememos/memos.git
synced 2026-11-19 10:29:11 +01:00
dcf08b5911
Add .github/actions/setup-go (Go version from go.mod) and .github/actions/setup-web (pnpm from web/package.json, Node 24, frozen install), and use them in every workflow that installed the toolchains by hand. Drop the per-workflow version env vars and the redundant pnpm store cache steps that duplicated setup-node's cache.
49 lines
934 B
YAML
49 lines
934 B
YAML
name: Frontend Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "web/**"
|
|
- ".github/actions/setup-web/**"
|
|
- ".github/workflows/frontend-tests.yml"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup web
|
|
uses: ./.github/actions/setup-web
|
|
|
|
- name: Run lint
|
|
working-directory: web
|
|
run: pnpm lint
|
|
|
|
- name: Run unit tests
|
|
working-directory: web
|
|
run: pnpm test
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup web
|
|
uses: ./.github/actions/setup-web
|
|
|
|
- name: Build frontend
|
|
working-directory: web
|
|
run: pnpm build
|