-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (43 loc) · 1.12 KB
/
ci-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CI-Test
on:
pull_request:
branches:
- '**'
defaults:
run:
working-directory: ./
shell: bash
jobs:
build:
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.pull_request.labels.*.name), 'ci-skip')"
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: './package-lock.json'
- name: Prepare dot npmrc for private registry
run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GH_TOKEN }} >> .npmrc
- name: Bootstrap
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm ci
env:
NPM_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Build Test
run: npm run build
env:
NODE_ENV: dev
CI: true
- name: Pebbles Test
run: npm run test
env:
NODE_ENV: test
CI: true