Skip to content

Use a manual check for integration-test-result #32

Use a manual check for integration-test-result

Use a manual check for integration-test-result #32

Workflow file for this run

name: Normal tests
on:
pull_request:
merge_group:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
normal-test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Get the behavior from the PR description
id: get-behavior
uses: actions/github-script@v6
with:
result-encoding: string
script: |
let behavior = '{}';
if (context.payload.pull_request) {
const { body } = context.payload.pull_request;
const regex = /^\#normal-test:\s+(.*)$/m;
const result = regex.exec(body);
if (result) {
behavior = result[1];
}
}
console.log(behavior);
return behavior;
- name: run normal test
run: |
sleep ${{ fromJSON(steps.get-behavior.outputs.result).sleep || 15 }}
exit ${{ fromJSON(steps.get-behavior.outputs.result).exitCode || 0 }}