Bats junit test #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BATS Tests | |
on: | |
pull_request: | |
push: | |
branches: [master, next] | |
workflow_dispatch: | |
jobs: | |
bats: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
bash: ["bash:4.2", "bash:4.4", "bash:5.0", "bash:5.2"] | |
container: | |
image: ${{ matrix.bash }} | |
steps: | |
- name: Install packages | |
run: | | |
# Pipeline requirements | |
apk add curl git 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 | |
run: bats --verbose-run --report-formatter junit test/ | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: "report.xml" | |
bats-macos: | |
runs-on: macos-latest | |
strategy: | |
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: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: "report.xml" |