forked from IBM/openapi-to-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.44 KB
/
Copy pathtest.yml
File metadata and controls
49 lines (47 loc) · 1.44 KB
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
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Testing on Node ${{matrix.node_version}}
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [16, 19]
steps:
- name: Checkout Master
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node ${{matrix.node_version}}
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node_version }}
- name: Cache Yarn
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{matrix.node_version}}-node-modules-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{matrix.node_version}}-node-modules-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-${{matrix.node_version}}-node-modules-
- name: Install Dependencies using Yarn
run: yarn install && git checkout yarn.lock
- name: Cache Jest
uses: actions/cache@v2
with:
path: .cache/jest
key: ${{ runner.os }}-${{matrix.node_version}}-jest-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{matrix.node_version}}-jest-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-${{matrix.node_version}}-jest-
- name: Test
run: yarn test
env:
CI: true