Skip to content

Context building slog sender #25797

Context building slog sender

Context building slog sender #25797

name: Test Documentation
on:
pull_request:
merge_group:
schedule:
- cron: '17 6 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-dapp:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x']
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
path: ./agoric-sdk
- uses: ./agoric-sdk/.github/actions/restore-node
with:
node-version: ${{ matrix.node-version }}
path: ./agoric-sdk
# Select a branch of the
# [documentation repository](https://github.com/Agoric/documentation)
# against which to test, defaulting to 'main' but allowing overrides in
# the pull request description using lines like
# `#documentation-branch: node-22`
- name: Get the appropriate dapp branch
id: get-branch
uses: actions/github-script@v7
with:
result-encoding: string
script: |
let branch = 'main';
if (context.payload.pull_request) {
const { body } = context.payload.pull_request;
const regex = /^\#documentation-branch:\s+(\S+)/m;
const result = regex.exec(body);
if (result) {
branch = result[1];
}
}
console.log('documentation branch: ' + branch);
return branch;
- name: Check out dapp
uses: actions/checkout@v4
with:
repository: Agoric/documentation
path: dapp
ref: ${{steps.get-branch.outputs.result}}
- name: point dapp to agoric-SDK HEAD
# This assumes the dapp uses Yarn 4 and its other deps are compatible
# with the versions in the agoric-sdk packages.
run: yarn link ../agoric-sdk --all --relative
working-directory: ./dapp
- name: yarn build in dapp
run: yarn build
working-directory: ./dapp
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp
- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./agoric-sdk/.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}