Skip to content

Test Cancellation Behavior #5

Test Cancellation Behavior

Test Cancellation Behavior #5

Workflow file for this run

name: Test Cancellation Behavior
on:
workflow_dispatch:
inputs:
wait_time:
description: 'Wait time in seconds'
required: true
default: '300'
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-cancellation:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Intentional failure
run: exit 1
- name: Wait step (runs on failure)
if: always()
run: |
sleep 300
- name: Always run step
if: always()
run: |
echo "This step should always run, even after cancellation"
echo "Current status: ${{ job.status }}"
- name: Final step
run: |
echo "If you see this, the workflow was not cancelled"