Skip to content

Using npm test script for CI tests #59

Using npm test script for CI tests

Using npm test script for CI tests #59

Workflow file for this run

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: npm test --recursive --formatter junit tests/ > 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