-
Notifications
You must be signed in to change notification settings - Fork 114
70 lines (60 loc) · 1.72 KB
/
test.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
name: Test Packages
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["16"]
name: Build with Node ${{ matrix.node }}
steps:
- name: 🏗 Setup repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: 📦 Install dependencies
run: yarn install --frozen-lockfile --check-files
- name: 👷 Build packages
run: yarn lerna run prepare --stream
# - name: 🚨 Lint Docs app
# run: yarn lint --max-warnings 0
- name: ♻️ Store build artifacts
uses: actions/cache@v3
with:
path: "*"
key: v3-${{ github.sha }}-${{ matrix.node }}
test:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
node: ["16"]
package: [expo-router, expo-metro-runtime]
name: Test ${{ matrix.package }} on Node ${{ matrix.node }}
steps:
- name: ♻️ Restore build artifacts
uses: actions/cache@v3
with:
path: "*"
key: v3-${{ github.sha }}-${{ matrix.node }}
- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: 💅 Lint ${{ matrix.package }}
run: yarn lint --max-warnings=0
working-directory: packages/${{ matrix.package }}
- name: 🧪 Test ${{ matrix.package }}
run: yarn test
working-directory: packages/${{ matrix.package }}
env:
EXPO_DEBUG: true