-
Notifications
You must be signed in to change notification settings - Fork 82
96 lines (90 loc) · 2.54 KB
/
test.yaml
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
name: Test
on:
push: {}
pull_request:
types: [opened, synchronize]
jobs:
"Build":
runs-on: ubuntu-latest
steps:
- name: Check out sources
uses: actions/checkout@v3
- name: Install build dependencies
uses: ./.github/actions/install-dependencies
with:
build: true
test: false
- name: Build artifacts
uses: ./.github/actions/build
with:
minify: lib
manuals: true
verify: false
inline: false
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: ${{ !env.ACT && !failure() }}
with:
path: |
${{ github.workspace }}/bin/
${{ github.workspace }}/doc/
"Test":
runs-on: ubuntu-latest
steps:
- name: Check out sources
uses: actions/checkout@v3
- name: Install test dependencies
uses: ./.github/actions/install-dependencies
with:
build: false
test: true
- name: Test scripts
uses: ./.github/actions/test
"Test_Consistency":
runs-on: ubuntu-latest
needs: "Test"
steps:
- name: Check out sources
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
build: true
test: true
- name: Build scripts
uses: ./.github/actions/build
with:
minify: lib
manuals: false
verify: false
inline: false
- name: Test built scripts
uses: ./.github/actions/test
with:
compiled: true
"Test_Symlinks":
runs-on: ubuntu-latest
needs: "Test"
env:
BAT_PAGER: 'cat'
steps:
- name: Check out sources
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
build: false
test: true
- name: Prepare symlinks
run: |
chmod +x "${{ github.workspace }}/src/batgrep.sh"
ln -s "${{ github.workspace }}/src/batgrep.sh" "${{ runner.temp }}/absolute-batgrep"
(cd "${{ github.workspace }}" && ln -s "src/batgrep.sh" relative-batgrep)
- name: Test absolute symlink
run: |
PATH="${{ runner.temp }}/bin:${PATH}"
"${{ runner.temp }}/absolute-batgrep" 'a' <<< 'abc'
- name: Test relative symlink
run: |
PATH="${{ runner.temp }}/bin:${PATH}"
"${{ github.workspace }}/relative-batgrep" 'a' <<< 'abc'