-
-
Notifications
You must be signed in to change notification settings - Fork 18
62 lines (54 loc) · 1.39 KB
/
pr-apps.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
---
name: Apps
on:
pull_request:
branches:
- main
defaults:
run:
working-directory: ./apps
jobs:
changes:
runs-on: ubuntu-latest
outputs:
apps: ${{ steps.changes.outputs.apps }}
steps:
# find out what deploy stack to use
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
apps:
- 'apps/**'
- '.github/workflows/pr-apps.yaml'
build-test-apps:
needs: changes
if: needs.changes.outputs.apps == '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 --immutable
- 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: Build
run: yarn build
- name: Test
run: yarn test