Use bats-core/bats-action to set up Bats (#176)

This is the "official" (under the bats-core organization) GitHub Action
for setting up Bats in a workflow. This removes the need to manually
install the `bats` package.

Also, update to the latest actions/checkout version and use the latest
Ubuntu image.
This commit is contained in:
Jon Parise 2025-12-07 13:33:10 -05:00 committed by GitHub
parent b73ed5f7f9
commit c6b5d3da3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,13 +3,11 @@ on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Install Bats
run: |
sudo apt-get update
sudo apt-get install --assume-yes bats
uses: bats-core/bats-action@3.0.1
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: Run tests
run: bats test