-
Notifications
You must be signed in to change notification settings - Fork 275
90 lines (85 loc) · 2.58 KB
/
pr.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: pr
on:
- pull_request
jobs:
graphql-15:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install Dependencies
run: yarn --frozen-lockfile && yarn format:ci
- name: Install GraphQL@15.x
run: yarn add graphql@^15
- name: Test
run: yarn -s test:ci
test:
strategy:
matrix:
node-version: [14.x, 16.x]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: yarn --frozen-lockfile || yarn --frozen-lockfile
- name: Check Prettier
if: matrix.os != 'windows-latest'
run: yarn format:ci
- name: Test
run: yarn -s test:ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
with:
directory: ./coverage
test-examples:
strategy:
matrix:
example:
- apollo-fullstack
- kitchen-sink
- ts-ast-reader
# - ghost
# - githunt-api requires node 8
# - star-wars requires special commands
# rm examples/star-wars/src/star-wars-typegen.ts
# rm examples/star-wars/star-wars-schema.graphql
# node examples/star-wars/dist/schema.js
# git diff --exit-code
node-version: [14.x]
os: [macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: yarn --frozen-lockfile || yarn --frozen-lockfile
- name: Check Formatting
run: yarn format:ci
- name: Link
run: yarn link
- name: Example Install
run: yarn --cwd=examples/${{ matrix.example }} --frozen-lockfile
- name: Example Use Link
run: yarn --cwd=examples/${{ matrix.example }} link nexus
- name: Example Typecheck
run: yarn --cwd=examples/${{ matrix.example }} tsc
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- name: Install Dependencies
run: yarn --frozen-lockfile || yarn --frozen-lockfile
- name: Prettier
run: yarn format:ci