-
Notifications
You must be signed in to change notification settings - Fork 897
97 lines (80 loc) · 2.24 KB
/
test.yml
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
name: CI
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-all-ubuntu-bash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run setup scripts with Bash
shell: bash
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "nobody@localhost"
chmod +x ./test-all.sh
./test-all.sh
test-all-macos-bash:
needs: test-all-ubuntu-bash
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Run setup scripts with Bash
shell: bash
run: |
chmod +x ./test-all.sh
echo "Test using bash"
./test-all.sh -s bash
test-all-macos-zsh:
needs: test-all-ubuntu-bash
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Run setup scripts with Zsh
shell: bash
run: |
chmod +x ./test-all.sh
echo "Test using zsh"
./test-all.sh -s zsh
test-basic-ubuntu-pwsh:
needs: test-all-ubuntu-bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run PowerShell Core test scripts
run: ./test.ps1
shell: pwsh
test-all-container-git-versions:
needs: test-all-ubuntu-bash
strategy:
# do not exit if one of the builds fail
fail-fast: false
matrix:
# docker tags to use in matrix build
git_version: [latest, 2.30.2, 2.23.0, 2.19.2]
runs-on: ubuntu-latest
container:
image: bitnami/git:${{ matrix.git_version }}
steps:
- uses: actions/checkout@v2
- name: Run setup scripts with Bash
shell: bash
run: |
git config --global --add safe.directory /__w/git-katas/git-katas
git --version
git config --global user.name "GitHub Actions"
git config --global user.email "nobody@localhost"
chmod +x ./test-all.sh
./test-all.sh
# job will succeed if all matrix builds succeed,
# used a toll gate to merge pr, without having
# to manually require all matrix steps...
test-all-container-matrix-success:
runs-on: ubuntu-latest
needs: test-all-container-git-versions
steps:
- run: echo Done!