Skip to content

tests by @renovate[bot] #229

tests by @renovate[bot]

tests by @renovate[bot] #229

Workflow file for this run

name: test
run-name: tests by @${{ github.actor }}
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
name: Unit tests (bats)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
- name: Install yq
run: |
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
- name: Run unit tests
run: make test-unit
lint:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Run shellcheck
run: shellcheck --severity=error src/crabcode
draw:
name: Draw build and test (Node ${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
node: [20, 22, 24]
defaults:
run:
working-directory: plugins/draw
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: |
plugins/draw/package-lock.json
plugins/draw/ui/package-lock.json
- run: npm ci
- run: npm test
- run: npm ci
working-directory: plugins/draw/ui
- run: npm run build
working-directory: plugins/draw/ui
- run: npm run test:integration
ci-success:
name: CI Success
runs-on: ubuntu-latest
needs: [unit, lint, draw]
# The shared action waits for all PR checks on this commit; on push to main
# it can also pick up unrelated branch checks (for example Dependabot).
if: ${{ always() && github.event_name == 'pull_request' }}
timeout-minutes: 5
permissions:
checks: read
statuses: read
steps:
- name: Wait for all PR checks to succeed
uses: promptfoo/.github/.github/actions/ci-success@10fb60ee3167be1ffffaff46b0ad23ea66ab0d33 # main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
timeout-seconds: 300