-
-
Notifications
You must be signed in to change notification settings - Fork 21
116 lines (100 loc) · 3.3 KB
/
create-react-server.yml
File metadata and controls
116 lines (100 loc) · 3.3 KB
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
108
109
110
111
112
113
114
115
116
name: create-react-server 🧪
env:
NODE_OPTIONS: --max-old-space-size=6144
permissions:
checks: write
contents: read
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
changed:
name: Get changed files 📂
runs-on: ubuntu-latest
outputs:
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
packages/create-react-server/**
packages/react-server/**
.github/workflows/create-react-server.yml
test-create:
needs: changed
if: contains(needs.changed.outputs.all_changed_files, 'packages/create-react-server') || contains(needs.changed.outputs.all_changed_files, 'packages/react-server') || contains(needs.changed.outputs.all_changed_files, '.github/workflows/create-react-server.yml')
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
include:
- runtime: node
pkg_mgr: npm
- runtime: node
pkg_mgr: pnpm
- runtime: bun
pkg_mgr: npm
- runtime: bun
pkg_mgr: pnpm
- runtime: bun
pkg_mgr: bun
- runtime: deno
pkg_mgr: npm
- runtime: deno
pkg_mgr: pnpm
fail-fast: false
name: "Test create ${{ matrix.runtime }}/${{ matrix.pkg_mgr }} 🧪"
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/workflows/actions/common-setup
with:
node_version: 20
- name: Test create-react-server (${{ matrix.runtime }}/${{ matrix.pkg_mgr }})
working-directory: ./packages/create-react-server/test
run: PKG_MGR=${{ matrix.pkg_mgr }} pnpm test:${{ matrix.runtime }}
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-create-${{ matrix.runtime }}-${{ matrix.pkg_mgr }}
path: packages/create-react-server/test/test-results/junit.xml
if-no-files-found: ignore
retention-days: 7
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/create-react-server/test/test-results/junit.xml
flags: create-${{ matrix.runtime }}-${{ matrix.pkg_mgr }}
report_type: test_results
test-results:
name: Test Results 📊
needs: test-create
if: always() && needs.test-create.result != 'skipped'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all test results
uses: actions/download-artifact@v4
with:
pattern: test-results-create-*
path: test-results
- name: Publish test results
uses: dorny/test-reporter@v1
with:
name: Create React Server Test Report
path: "test-results/**/junit.xml"
reporter: java-junit
fail-on-error: false