|
10 | 10 | strategy:
|
11 | 11 | matrix:
|
12 | 12 | os: [ubuntu-latest, macos-latest, windows-latest]
|
| 13 | + include: |
| 14 | + - os: ubuntu-latest |
| 15 | + index: 1 |
| 16 | + - os: ubuntu-latest |
| 17 | + index: 2 |
| 18 | + - os: ubuntu-latest |
| 19 | + index: 3 |
| 20 | + - os: ubuntu-latest |
| 21 | + index: 4 |
13 | 22 |
|
14 | 23 | steps:
|
15 | 24 | - uses: actions/setup-go@v3
|
@@ -126,13 +135,39 @@ jobs:
|
126 | 135 | - name: Go Repository tests
|
127 | 136 | run: |
|
128 | 137 | go test -v github.com/gopherjs/gopherjs/tests/gorepo
|
| 138 | +
|
| 139 | + - name: Download JUnit Summary from Previous Workflow |
| 140 | + if: matrix.index |
| 141 | + id: download-artifact |
| 142 | + uses: dawidd6/action-download-artifact@v2 |
| 143 | + with: |
| 144 | + workflow_conclusion: success |
| 145 | + name: junit-test-summary |
| 146 | + if_no_artifact_found: warn |
| 147 | + # Uncomment the next line before pushing to main branch, that way all branches can |
| 148 | + # benefit from timing data once it's established there. |
| 149 | + # branch: main |
| 150 | + |
| 151 | + - name: Install gotestsum |
| 152 | + if: matrix.index |
| 153 | + run: go install gotest.tools/gotestsum@latest |
| 154 | + - name: Generate go test Slice |
| 155 | + if: matrix.index |
| 156 | + id: test_split |
| 157 | + env: |
| 158 | + GOOS: js |
| 159 | + GOARCH: ecmascript |
| 160 | + uses: hashicorp-forge/go-test-split-action@v1 |
| 161 | + with: |
| 162 | + total: 4 |
| 163 | + index: ${{ matrix.index }} |
| 164 | + packages: "std github.com/gopherjs/gopherjs/js/... github.com/gopherjs/gopherjs/tests/..." |
129 | 165 | - name: gopherjs test ...
|
130 |
| - if: matrix.os == 'ubuntu-latest' |
| 166 | + if: matrix.index |
131 | 167 | run: |
|
132 | 168 | set -e
|
133 | 169 | ulimit -s 10000
|
134 |
| - PACKAGE_NAMES=$( \ |
135 |
| - GOOS=js GOARCH=ecmascript go list std github.com/gopherjs/gopherjs/js/... github.com/gopherjs/gopherjs/tests/... \ |
136 |
| - | grep -v -x -f .std_test_pkg_exclusions \ |
137 |
| - ) |
138 |
| - gopherjs test -p 2 --minify -v --short $PACKAGE_NAMES |
| 170 | +
|
| 171 | + PACKAGE_NAMES=$(for pkg in ${{ steps.test_split.outputs.run }}; do echo "$pkg"; done | grep -v -x -f .std_test_pkg_exclusions) |
| 172 | +
|
| 173 | + gopherjs test -p 2 --minify -v --short "${{ steps.test_split.outputs.run }}" |
0 commit comments