forked from graphql-nexus/nexus-prisma
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (74 loc) · 2.53 KB
/
trunk.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
name: trunk
on:
push:
branches: [main]
jobs:
test-latest-prisma:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
node-version: [14.x, 16.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn global add yalc
- run: yarn --frozen-lockfile
- name: Set E2E DB Schema
run: yarn -s ts-node scripts/get-e2e-db-schema --os ${{ matrix.os }} --node-version ${{ matrix.node-version }} --github-env $env:GITHUB_ENV
if: ${{ matrix.os == 'windows-latest' }}
- name: Set E2E DB Schema
run: yarn -s ts-node scripts/get-e2e-db-schema --os ${{ matrix.os }} --node-version ${{ matrix.node-version }} --github-env $GITHUB_ENV
if: ${{ matrix.os != 'windows-latest' }}
- run: yarn -s build
- run: yarn -s test:ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
with:
directory: ./coverage
test-past-prisma:
strategy:
matrix:
os: ['ubuntu-latest']
node-version: [16.x]
prisma-client-version: ['2.29']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn global add yalc
- run: yarn --frozen-lockfile
- name: Set E2E DB Schema
run: yarn -s ts-node scripts/get-e2e-db-schema --os ${{ matrix.os }} --node-version ${{ matrix.node-version }} --github-env $GITHUB_ENV
- run: yarn -s build
- name: Install Prisma Client version
run: yarn -s add @prisma/client@${{ matrix.prisma-client-version }}
- run: yarn -s test:ci
release-canary:
needs:
- test-latest-prisma
- test-past-prisma
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Release Canary
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
yarn -s dripip preview --json > result.json
jq '.' < result.json