websnacks/.forgejo/workflows/ci.yml
M. George Hansen 7de82dd3fb
All checks were successful
CI / check (push) Successful in 13s
CI / build (24) (push) Successful in 41s
CI / build (22) (push) Successful in 42s
core: migrate ci workflows to forgejo
Reviewed-on: #1
2026-05-03 07:54:45 +00:00

40 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
check:
runs-on: node-24
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- name: Cache npm dependencies
uses: https://code.forgejo.org/actions/cache@v4
with:
path: ~/.npm
key: node-24-${{ hashFiles('**/package-lock.json') }}
restore-keys: node-24-
- run: npm ci
- run: npm run check
build:
needs: check
strategy:
matrix:
node: [22, 24]
runs-on: node-${{ matrix.node }}
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- name: Cache npm dependencies
uses: https://code.forgejo.org/actions/cache@v4
with:
path: ~/.npm
key: node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: node-${{ matrix.node }}-
- run: npm ci
- run: npm run build
- run: npm test