Skip to content

Commit 9d4a208

Browse files
committed
Fix CI
1 parent cf7fc8f commit 9d4a208

File tree

1 file changed

+17
-81
lines changed

1 file changed

+17
-81
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -3,102 +3,38 @@ name: CI
33
on: [push, pull_request]
44

55
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-
326
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 }}
388
strategy:
399
fail-fast: false
4010
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+
]
5021

5122
steps:
5223
- name: Check out repo
5324
uses: actions/checkout@v4
54-
# with:
55-
# ref: ${{ github.event.pull_request.head.sha }}
5625

5726
- name: Use Node.js ${{ matrix.node }}
5827
uses: actions/setup-node@v4
5928
with:
6029
node-version: ${{ matrix.node }}
61-
# cache: 'yarn'
30+
cache: 'yarn'
6231

6332
- name: Install dependencies
64-
run: yarn install
33+
run: yarn workspaces focus ${{ matrix.packages }}
6534

6635
- 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 }}
10237

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

Comments
 (0)