Updated linting config and renamed tests dir #57
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: tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: shellcheck ./src/* | |
test: | |
permissions: | |
checks: write | |
strategy: | |
matrix: | |
os: ['macos-latest', 'ubuntu-latest'] | |
include: | |
- os: ubuntu-latest | |
installzsh: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- if: matrix.installzsh | |
run: sudo apt-get install zsh | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: npm ci | |
- run: mkdir -p junit | |
- name: Run bats tests | |
run: ./node_modules/.bin/bats --recursive --formatter junit test/ > junit/${{ matrix.os }}.xml | |
- name: Publish bats test results | |
uses: dorny/test-reporter@v1 | |
if: ${{ always() }} | |
with: | |
name: test results (${{ matrix.os }}) | |
path: junit/${{ matrix.os }}.xml | |
reporter: jest-junit |