This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 479
107 lines (105 loc) · 3.18 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: yarn install --frozen-lockfile --check-files
- run: yarn lerna run prepare --stream
- run: yarn lint --max-warnings=0
- uses: actions/cache@v2
with:
key: v2-${{ github.sha }}-${{ matrix.node }}
path: |
'*'
'!node_modules'
'!**/node_modules'
test:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
node: ['16']
package:
[
dev-tools,
babel-preset-cli,
expo-cli,
expo-codemod,
pwa,
# webpack-config,
xdl,
]
name: Test ${{ matrix.package }} on Node ${{ matrix.node }}
steps:
- uses: actions/cache@v2
with:
path: '*'
key: v2-${{ github.sha }}-${{ matrix.node }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install packages
run: yarn install --frozen-lockfile --check-files
- name: Test ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: yarn test
# run: cd packages/${{ matrix.package }} && yarn test --coverage
env:
CI: true
EXPO_DEBUG: true
# - name: Get Test Flag Name
# id: cov-flag-name
# run: echo "::set-output name=flag::$(echo ${{ matrix.package }} | perl -pe 's/[^a-z]+([a-z])/\U\1/gi;s/^([A-Z])/\l\1/')"
# - uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# file: ./packages/${{ matrix.package }}/coverage/clover.xml # optional
# flags: ${{ steps.cov-flag-name.outputs.flag }} # optional
# fail_ci_if_error: false # optional (default = false)
# puppeteer:
# runs-on: ubuntu-latest
# needs: build
# strategy:
# fail-fast: false
# name: Expo Webpack
# steps:
# - uses: actions/cache@v2
# with:
# path: '*'
# key: v2-${{ github.sha }}-${{ matrix.node }}
# - name: Install puppeteer
# working-directory: packages/webpack-config
# run: yarn add -D [email protected]
# - name: Install test project dependencies
# working-directory: packages/webpack-config/e2e/basic
# run: yarn
# # Test starting an Expo web project
# - name: Test starting Webpack
# working-directory: packages/webpack-config
# run: yarn test:e2e:start
# env:
# CI: true
# # Test building an Expo web project
# - name: Test building Webpack
# working-directory: packages/webpack-config
# run: yarn test:e2e:build
# env:
# CI: true