forked from jaredpalmer/tsdx
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (72 loc) · 2.44 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: test
on:
workflow_dispatch:
push:
branches:
- master
- main
paths-ignore:
- 'test/**'
- '.run/**'
- '.github/**'
- '/*.*'
- '/.*'
# schedule:
## https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
## ┌───────────── minute (0 - 59)
## │ ┌───────────── hour (0 - 23)
## │ │ ┌───────────── day of the month (1 - 31)
## │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
## │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
## │ │ │ │ │
## │ │ │ │ │
## │ │ │ │ │
## * * * * *
# - cron: '* * 1 * *'
# - cron: '* * 15 * *'
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [ 16, 18, 20, node ]
steps:
- uses: actions/checkout@main
with:
fetch-depth: 2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@main
with:
node-version: ${{ matrix.node-version }}
- name: get yarn cache dir
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: set cache id
id: id-cache
run: echo "::set-output name=id::${GITHUB_SHA}"
- name: echo var
run: |
echo ${{ steps.yarn-cache.outputs.dir }}
echo ${{ steps.id-cache.outputs.id }}
echo ${GITHUB_SHA}
- name: yarn cache
uses: bluelovers/github-actions-cache@2020011001
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ steps.id-cache.outputs.id }}
restore-keys: |
${{ runner.os }}-yarn-
- name: setup git config
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: install deps
run: |
yarn install --frozen-lockfile
# yarn run ci:install
# yarn add -W typescript@next jest ts-jest ts-node ynpx lerna
- name: run script
if: success()
# env:
run: yarn run test