Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions .github/workflows/arn-code-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: arn-code CI

# The quick check of every PR. The full test suite runs by hand: arn-code-full-tests.yml.

on:
pull_request:
paths:
Expand All @@ -8,6 +10,7 @@ on:
- "scripts/ci/**"
- "tests/arn-code/**"
- ".github/workflows/arn-code-ci.yml"
- ".github/workflows/arn-code-full-tests.yml"
push:
branches: [main]

Expand All @@ -21,28 +24,8 @@ jobs:
- uses: actions/checkout@v4
- name: Static checks (frontmatter, references, presets, hooks)
run: python3 scripts/ci/validate-arn-code.py

scripts:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Shell syntax
run: |
for f in plugins/arn-code/hooks/*.sh plugins/arn-code/skills/*/scripts/*.sh tests/arn-code/*.sh; do
bash -n "$f" || exit 1
done
- name: Tool versions
run: |
bash --version | head -1
command -v python3 && python3 --version || echo 'no working python3'
command -v python && python --version || echo 'no python'
command -v jq || echo 'no jq'
- name: Script and hook tests (system bash; 3.2 on macOS; Git Bash on Windows)
run: bash tests/arn-code/run-tests.sh
50 changes: 50 additions & 0 deletions .github/workflows/arn-code-full-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: arn-code full tests

# Run by hand only: gh workflow run arn-code-full-tests.yml --ref <branch>
# Branch protection on main requires the "full-tests" check, so a PR cannot merge until this has
# passed on its last commit. A new push needs a new run. Keep this file free of pull_request and
# push triggers: a job skipped by a condition counts as passed for a required check.

on:
workflow_dispatch:

permissions:
contents: read

# A new run on the same branch replaces the one in progress.
concurrency:
group: full-tests-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
timeout-minutes: 150
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Tool versions
run: |
bash --version | head -1
command -v python3 && python3 --version || echo 'no working python3'
command -v python && python --version || echo 'no python'
command -v jq || echo 'no jq'
- name: Script and hook tests (system bash; 3.2 on macOS; Git Bash on Windows)
run: bash tests/arn-code/run-tests.sh

# The one check that branch protection requires: its name does not change with the system list.
full-tests:
needs: tests
if: always()
runs-on: ubuntu-latest
steps:
- name: All systems passed
env:
RESULT: ${{ needs.tests.result }}
run: test "$RESULT" = success
Loading