forked from dotansimha/graphql-code-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.56 KB
/
main.yml
File metadata and controls
57 lines (55 loc) · 1.56 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
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Testing on Node ${{matrix.node_version}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_version: [12, 16]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node_version }}
- name: Setup NPM credentials
run: echo "//npm.pkg.github.com/:_authToken=$READ_PACKAGES_AUTH_TOKEN" > ~/.npmrc
env:
READ_PACKAGES_AUTH_TOKEN: ${{ secrets.READ_PACKAGES_AUTH_TOKEN }}
- name: Cache Yarn
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{matrix.node_version}}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{matrix.node_version}}-yarn-
- 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-
- name: Install Dependencies using Yarn
run: yarn install
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
env:
CI: true
- name: Test dev-tests
run: |
yarn run generate:examples
git diff --exit-code -- dev-test/