File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,33 @@ export default {
20
20
sortTestFiles : (file1 , file2 ) => testData[file1].order - testData[file2].order ,
21
21
};
22
22
```
23
+
24
+ ## Splitting tests on GitHub Actions
25
+
26
+ Although GitHub Actions doesn't support parallel builds out-of-the-box with AVA, you can configure it manually by using a matrix:
27
+
28
+ ** ` .github/workflows/test.yml ` :**
29
+
30
+ ``` yml
31
+ on : push
32
+ jobs :
33
+ test :
34
+ strategy :
35
+ # Don't cancel test runs if one fails
36
+ fail-fast : false
37
+ # Run 4 jobs in parallel, each executing a subset of all tests
38
+ matrix :
39
+ node_index : [0, 1, 2, 3]
40
+ total_nodes : [4]
41
+
42
+ runs-on : ubuntu-latest
43
+ steps :
44
+ # Check out code and perform setup steps
45
+ # ...
46
+
47
+ - name : Test
48
+ run : npx ava
49
+ env :
50
+ CI_NODE_INDEX : ${{ matrix.node_index }}
51
+ CI_NODE_TOTAL : ${{ matrix.total_nodes }}
52
+ ` ` `
You can’t perform that action at this time.
0 commit comments