File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run tests
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ run-tests :
7
+ strategy :
8
+ matrix :
9
+ os : [ 'windows', 'ubuntu', 'macos' ]
10
+ fail-fast : false
11
+ runs-on : ${{ matrix.os }}-latest
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+ - name : Setup python
15
+ uses : actions/setup-python@v2
16
+ with :
17
+ python-version : 3.x
18
+ - name : test
19
+ shell : bash
20
+ run : |
21
+ # setup-python puts `python` into the `PATH`, not `python3`, yet
22
+ # `git-filter-repo` expects `python3` in the `PATH`. Let's add
23
+ # a shim.
24
+ printf '#!/bin/sh\n\nexec python "$@"\n' >python3 &&
25
+
26
+ export PATH=$PWD:$PATH &&
27
+ export PYTHONPATH=$PWD &&
28
+ export TEST_SHELL_PATH=/bin/sh &&
29
+
30
+ failed=0 &&
31
+ cd t &&
32
+ for t in t[0-9]*.sh
33
+ do
34
+ printf '\n\n== %s ==\n' "$t" &&
35
+ bash $t -q -v -x ||
36
+ failed=$(($failed+1))
37
+ done &&
38
+ if test 0 != $failed
39
+ then
40
+ mkdir ../failed &&
41
+ tar czf ../failed/failed.tar.gz .
42
+ exit 1
43
+ fi
44
+ - name : upload failed tests' directories
45
+ if : failure()
46
+ uses : actions/upload-artifact@v1
47
+ with :
48
+ name : failed-${{ matrix.os }}
49
+ path : failed
You can’t perform that action at this time.
0 commit comments