Repository navigation
69 lines (69 loc) · 2.46 KB
/
Copy pathcheck.yml
File metadata and controls
69 lines (69 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: check
# Dogfood the root action (action.yml): `uses: ./` with the probbit built from this commit, on Linux and macOS.
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
dogfood:
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: build probbit
run: cargo build --release --locked -p probbit-cli
- name: a strand of the dispatch policy (the receipts the check replays)
shell: bash
run: |
mkdir -p receipts
printf '%s\n' '{"blast":0.2}' '{"error":true}' '{"error":true,"criticism":true,"src":"human"}' '{"praise":true,"src":"env"}' '{"blast":0.9}' \
| target/release/probbit live examples/persona/dispatch-policy.yaml --seed 2 --clock fixed --strand receipts/day1.strand > /dev/null
- name: the rule lock on the dispatch example
id: dispatch
uses: ./
with:
persona: examples/persona/dispatch-policy.yaml
props: examples/persona/dispatch-props.json
strands: |
receipts/*.strand
binary: target/release/probbit
- name: the shipped tutor (habit contradictions)
uses: ./
with:
persona: examples/persona/tutor.yaml
binary: target/release/probbit
- name: the outputs
shell: bash
run: |
test "${{ steps.dispatch.outputs.exit-code }}" = 0
jq -e '.verdict == {"broken":0,"conflicts":0,"exit":0,"held":3,"strands_ok":1,"strands_total":1,"unproven":0}' "${{ steps.dispatch.outputs.json }}"
install-gate:
# the install path: install.sh fetches a release; probbit 0.8.2 has no check command, so the action must stop with one error
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: the action with probbit 0.8.2
id: old
continue-on-error: true
uses: ./
with:
persona: examples/persona/tutor.yaml
version: v0.8.2
json-artifact: 'false'
- name: it stopped at the version gate
shell: bash
run: |
test "${{ steps.old.outcome }}" = failure
"$RUNNER_TEMP/probbit-bin/probbit" version | grep -qx 'probbit 0.8.2'