-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.1 KB
/
build-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
name: Build Test
on:
# Run GH Actions if push to `master` branch
push:
branches:
- master # ps. change to `main` if ur default branch follow's GitHub
# Run GH Actions if merge request to `master` branch
pull_request:
branches:
- master # ps. as above
jobs:
build:
# Use macOS, Ubuntu and Windows to test build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
node-version: [ 16, 18, 20, latest ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install deps
run: yarn install --frozen-lockfile
- name: Test build
run: yarn build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: built-on__os_${{ matrix.os }}__nodejs_${{ matrix.node-version }}
path: ./.output
retention-days: 3
# Authored by Defer.