2021-01-19 22:19:35 +01:00
|
|
|
name: Test
|
2020-12-09 02:49:54 +01:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
2022-09-10 20:56:34 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-12-09 02:49:54 +01:00
|
|
|
jobs:
|
2021-01-19 22:19:35 +01:00
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
2020-12-09 02:49:54 +01:00
|
|
|
steps:
|
2023-09-11 11:00:33 +02:00
|
|
|
- uses: actions/checkout@v4
|
2021-07-07 19:53:47 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-07-15 20:57:14 +02:00
|
|
|
- name: Install bats
|
2023-12-25 04:29:01 +01:00
|
|
|
run: git clone --depth 1 --branch v1.10.0 https://github.com/bats-core/bats-core.git bats
|
2021-07-15 20:57:14 +02:00
|
|
|
- name: Run tests
|
|
|
|
run: PATH="./bats/bin:$PATH" script/test
|
|
|
|
- name: Verify download URL checksums
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
run: ./script/mirror verify "$COMMIT_RANGE"
|
2021-07-07 19:53:47 +02:00
|
|
|
env:
|
2021-07-15 20:57:14 +02:00
|
|
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..
|