@@ -3,102 +3,38 @@ name: CI
3
3
on : [push, pull_request]
4
4
5
5
jobs :
6
- generate-matrix :
7
- name : Generate Job Matrix
8
- runs-on : ubuntu-latest
9
- outputs :
10
- matrix : ${{ steps.set-matrix.outputs.matrix }}
11
- steps :
12
- - uses : actions/checkout@v3
13
- - run : yarn
14
- - run : node ./scripts/mockTemplates.mjs
15
- id : set-matrix
16
- # changes:
17
- # name: Check for changes
18
- # runs-on: ubuntu-latest
19
-
20
- # steps:
21
- # - name: Checkout repository
22
- # uses: actions/checkout@v4
23
-
24
- # - name: Filter packages
25
- # uses: dorny/paths-filter@v3
26
- # id: filter
27
- # with:
28
- # filters: |
29
- # packages:
30
- # - 'packages/*'
31
-
32
6
test :
33
- name : Test ${{ matrix.nickname }}
34
- # name: Test
35
- if : needs.generate-matrix.outputs.matrix != ''
36
- needs : [generate-matrix]
37
- runs-on : ubuntu-latest
7
+ runs-on : ${{ matrix.os }}
38
8
strategy :
39
9
fail-fast : false
40
10
matrix :
41
- node : ['21.x']
42
- template : ${{fromJSON(needs.generate-matrix.outputs.matrix)}}
43
- # [
44
- # 'npx create-react-app cra-template-redux --template',
45
- # 'npx create-react-app cra-template-redux-typescript --template',
46
- # 'expo-template-redux-typescript',
47
- # 'react-native-template-redux-typescript',
48
- # 'vite-template-redux',
49
- # ]
11
+ node : [20.x]
12
+ os : [ubuntu-latest, windows-latest]
13
+ packages :
14
+ [
15
+ ' cra-template-redux' ,
16
+ ' cra-template-redux-typescript' ,
17
+ ' expo-template-redux-typescript' ,
18
+ ' react-native-template-redux-typescript' ,
19
+ ' vite-template-redux' ,
20
+ ]
50
21
51
22
steps :
52
23
- name : Check out repo
53
24
uses : actions/checkout@v4
54
- # with:
55
- # ref: ${{ github.event.pull_request.head.sha }}
56
25
57
26
- name : Use Node.js ${{ matrix.node }}
58
27
uses : actions/setup-node@v4
59
28
with :
60
29
node-version : ${{ matrix.node }}
61
- # cache: 'yarn'
30
+ cache : ' yarn'
62
31
63
32
- name : Install dependencies
64
- run : yarn install
33
+ run : yarn workspaces focus ${{ matrix.packages }}
65
34
66
35
- name : Mock the templates
67
- run : ${{ matrix.template }}
68
-
69
- # run: node ./scripts/mockTemplates.mjs
70
-
71
- # - name: Download Artifacts
72
- # uses: actions/download-artifact@v4
73
- # with:
74
- # name: ${{ needs.changes.outputs.packages }}
75
- # path: ${{ needs.changes.outputs.packages }}
76
-
77
- # - run: ls -lah
78
-
79
- # - name: Install build artifact
80
- # run: yarn workspace ${{ needs.changes.outputs.packages }} add $(pwd)/package.tgz
81
-
82
- # - name: Run tests, against dist
83
- # run: yarn test
84
-
85
- # build:
86
- # name: Build
87
- # runs-on: ubuntu-latest
88
- # strategy:
89
- # matrix:
90
- # node: ['20.x']
91
- # steps:
92
- # - name: Check out repo
93
- # uses: actions/checkout@v4
94
- # with:
95
- # ref: ${{ github.event.pull_request.head.sha }}
96
-
97
- # - name: Use Node.js ${{ matrix.node }}
98
- # uses: actions/setup-node@v4
99
-
100
- # - name: Install dependencies
101
- # run: yarn install
36
+ run : node scripts/mockTemplates.mjs ${{ matrix.packages }}
102
37
103
- # - name: Build
104
- # run: yarn build
38
+ - name : Run Test for ${{ matrix.packages }}
39
+ working-directory : example
40
+ run : npm run test
0 commit comments