[NVSHAS-9630] Update bat version #5
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: "build" | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup BATS | |
run: | | |
git clone https://github.com/bats-core/bats-core.git | |
cd bats-core | |
git switch v1.11.0 | |
sudo ./install.sh /usr/local | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Run tests | |
run: bats test | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: npm ci | |
- name: Install Hadolint | |
run: | | |
wget -O hadolint https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 | |
sudo mv hadolint /usr/local/bin/hadolint | |
sudo chmod +x /usr/local/bin/hadolint | |
- name: Run Hadolint | |
run: | | |
hadolint Dockerfile | |
- name: Check if README is up-to-date | |
run: | | |
npm run docs | |
git status | |
git diff --quiet || echo 'README is not up-to-date, run `npm install && npm run docs` to update.' | |
git diff --quiet || exit 1 |