Skip to content

Merge pull request #8 from checkly/herve/explicit-github-sha #24

Merge pull request #8 from checkly/herve/explicit-github-sha

Merge pull request #8 from checkly/herve/explicit-github-sha #24

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
harness:
name: Harness / ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
- name: Validate syntax
run: |
bash -n scripts/*.sh
node --check scripts/test-preflight-server.cjs
- name: Run ShellCheck
if: runner.os == 'Linux'
run: shellcheck scripts/*.sh
- name: Run actionlint
if: runner.os == 'Linux'
run: >-
docker run --rm -v "$PWD:/repo" -w /repo
rhysd/actionlint@sha256:887a259a5a534f3c4f36cb02dca341673c6089431057242cdc931e9f133147e9
- name: Run command behavior tests
run: ./scripts/test.sh
- name: Run integration tests
run: ./scripts/test-integration.sh
composite-action:
name: Composite action contract
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Invoke the local Action
uses: ./
env:
CHECKLY_ACTION_DRY_RUN: "1"
CHECKLY_ACTION_GITHUB_REPORT_AVAILABLE: "true"
with:
command: test
cli-version: 8.15.0
reporting: github-check
github-check-name: Checkly action contract
github-sha: 0123456789abcdef0123456789abcdef01234567
tags: smoke
ci:
name: CI
if: always()
needs:
- harness
- composite-action
runs-on: ubuntu-latest
steps:
- name: Verify required jobs
env:
HARNESS_RESULT: ${{ needs.harness.result }}
COMPOSITE_ACTION_RESULT: ${{ needs.composite-action.result }}
run: |
if [[ "$HARNESS_RESULT" != "success" || "$COMPOSITE_ACTION_RESULT" != "success" ]]; then
echo "Required CI failed: harness=$HARNESS_RESULT composite-action=$COMPOSITE_ACTION_RESULT"
exit 1
fi