High Priority PR test (#20) #116
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |