Skip to content
Snippets Groups Projects
Commit 75f5b15e authored by Xiao Gui's avatar Xiao Gui
Browse files

chore: specDone

bugfix: better reflect commit status
parent de4b50d4
No related branches found
No related tags found
No related merge requests found
......@@ -82,9 +82,6 @@ jobs:
with:
name: ${{ env.ARTEFACT_NAME }}
path: ./scrnsht/
outputs:
e2e_status: ${{ job.status }}
update-after-e2e-status:
if: always()
......@@ -97,7 +94,7 @@ jobs:
- name: update badge
run: |
state=''
[[ ${{ needs.e2e.outputs.e2e_status }} = success ]] && state="success" || state="failure"
[[ ${{ success() }} = "true" ]] && state="success" || state="failure"
curl -v \
-X POST \
-H "Authorization: Token ${{ secrets.WORKFLOW_TOKEN }}" \
......
......@@ -44,6 +44,12 @@ const localConfig = {
jasmine.getEnv().addReporter({
specDone: async ({ status, id, fullName, ...rest }) => {
if (status !== 'passed') {
if (process.stdout.isTTY) {
console.log(`\x1b[31m&s\x1b[0m`, 'F')
console.log(`spec failed, taking screenshot`)
} else {
console.log(`F`)
}
const b64 = await globalThis.IAVBase.takeScreenshot()
const dir = './scrnsht/'
await asyncMkdir(dir, { recursive: true })
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment