-
Notifications
You must be signed in to change notification settings - Fork 79
50 lines (47 loc) · 1.32 KB
/
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
49
50
name: Continuous Integration
on:
workflow_dispatch:
schedule:
- cron: '0 19 * * 1-5'
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
build:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Set git global config (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.filemode false
git config --global branch.autosetuprebase always
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag: v4.1.1
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # tag: v4.0.1
with:
node-version: lts/-1
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # tag: v3.3.2
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}-node-modules
- name: Install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install
- name: Test
run: yarn test