-
-
Notifications
You must be signed in to change notification settings - Fork 18
67 lines (59 loc) · 1.63 KB
/
pr-platform.yaml
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
---
name: Platform
on:
pull_request:
branches:
- main
defaults:
run:
working-directory: ./platform
jobs:
changes:
runs-on: ubuntu-latest
outputs:
platform: ${{ steps.changes.outputs.platform }}
steps:
# find out what deploy stack to use
- uses: actions/checkout@master
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
platform:
- 'platform/**'
- '.github/workflows/pr-platform.yaml'
build-test-platform:
needs: changes
if: needs.changes.outputs.platform == 'true'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Restore node modules
id: cache-node-modules-restore
uses: actions/cache/restore@v3
with:
path: |
node_modules
.yarn
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- name: Install Dependencies
run: yarn install
- name: Save node modules
if: steps.cache-node-modules-restore.outputs.cache-hit != 'true'
id: cache-node_modules-save
uses: actions/cache/save@v3
with:
path: |
node_modules
.yarn
key: ${{ steps.cache-node-modules-restore.outputs.cache-primary-key }}
- name: Code Generation
run: yarn gql
- name: Build
run: yarn build
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.TOKEN_CLOUDFLARE_API }}
- name: Test
run: yarn test