-
Notifications
You must be signed in to change notification settings - Fork 115
89 lines (77 loc) · 2.32 KB
/
bats.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
name: bats
on:
pull_request:
push:
branches: [master, next]
workflow_dispatch:
jobs:
bats-alpine:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
bash: ["4.2", "4.4", "5.0", "5.2"]
container:
image: bash:${{ matrix.bash }}
steps:
- name: Install packages
run: |
# Pipeline requirements
apk add curl git ncurses parallel sudo tar
# Theme dependencies
apk add bc coreutils gawk jq playerctl sed
# Allow tar to cache system paths
- name: root suid tar
run: sudo chown root:wheel /bin/tar && sudo chmod u+s /bin/tar
- name: Setup Bats and bats libs
uses: stealthii/bats-action@main
- name: Checkout code
uses: actions/checkout@v4
- name: Run tokyo-night-tmux tests
shell: bash -e {0}
run: bats --verbose-run --report-formatter junit test/
- name: Upload Test Report
uses: actions/upload-artifact@v4
if: always()
with:
name: report-alpine-${{ matrix.bash }}
path: report.xml
bats-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
libs: ["gnu", "builtin"]
steps:
- name: Install Homebrew packages
run: |
# Theme dependencies
brew install bash jq nowplaying-cli
if [[ "${{ matrix.libs }}" == "gnu" ]]; then
brew install bc coreutils gawk gsed
fi
- name: Setup Bats and bats libs
run: |
brew install bats-core
brew tap stealthii/bats-core
brew install bats-support bats-assert bats-file bats-detik bats-mock
- name: Checkout code
uses: actions/checkout@v4
- name: Run tokyo-night-tmux tests
run: bats --verbose-run --report-formatter junit test/
- name: Upload Test Report
uses: actions/upload-artifact@v4
if: always()
with:
name: report-macOS-${{ matrix.libs }}
path: report.xml
junit-publish:
needs: [bats-alpine, bats-macos]
runs-on: ubuntu-latest
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
with:
report_paths: "**/report.xml"