-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (45 loc) · 1.41 KB
/
pr_build_test.yaml
File metadata and controls
58 lines (45 loc) · 1.41 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
58
name: Pull Requests
on:
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
services:
mongo:
image: mongo:latest
ports:
- 27017:27017
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Fix Strapi GraphQL Plugin
run: npm run patch
- name: Fix Strapi GraphQL Plugin dependency
run: |
jq '.dependencies |= .+ { "@apollo/federation": "^0.15.0" }' node_modules/strapi-plugin-graphql/package.json > tmp.package.json && mv tmp.package.json node_modules/strapi-plugin-graphql/package.json
- name: Install Strapi GraphQL Plugin dependency
run: npm install
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: v1-npm-deps-${{ hashFiles('**/package-lock.json') }}
restore-keys: v1-npm-deps-
- name: Run Linter
run: npm run lint
- name: Run Unit Tests
run: echo "Oops! We should get some of those unit test thingys in here soon..."
- name: Run API tests
run: npm run test:api
- name: Test build admin UI
run: npm run build