parent
5118a8174b
commit
7de82dd3fb
2 changed files with 40 additions and 31 deletions
40
.forgejo/workflows/ci.yml
Normal file
40
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
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
|
||||
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
|
|
@ -1,31 +0,0 @@
|
|||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [mainline]
|
||||
pull_request:
|
||||
branches: [mainline]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- run: npm ci
|
||||
- run: npm run check
|
||||
|
||||
build:
|
||||
needs: check
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
node: [18, 20, 22]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
Loading…
Add table
Add a link
Reference in a new issue