Skip to content

All Examples

All Examples #73

Workflow file for this run

# File: vast-all.yml
# Author: Ryoichi Ando ([email protected])
# License: Apache v2.0
name: All Examples
on:
workflow_dispatch:
inputs:
runner:
type: string
required: true
description: 'Runner Name'
env:
VAST_API_KEY: ${{ secrets.VAST_API_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
HELPER_PATH: .github/workflows/vast/helper.sh
jobs:
part_1:
runs-on: ${{ github.event.inputs.runner }}
timeout-minutes: 300
steps:
- name: check out repo
uses: actions/checkout@v3
- name: prepare
timeout-minutes: 30
run: bash $HELPER_PATH create $VAST_API_KEY
- name: hang
timeout-minutes: 40
run: bash $HELPER_PATH run hang.py hang part-1
- name: needle
timeout-minutes: 40
run: bash $HELPER_PATH run needle.py needle part-1
- name: curtain
timeout-minutes: 40
run: bash $HELPER_PATH run curtain.py curtain part-1
- name: drape
timeout-minutes: 40
run: bash $HELPER_PATH run drape.py drape part-1
- name: collect
if: success() || failure()
run: bash $HELPER_PATH collect
- name: upload artifact
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ci-part-1
path: ci
retention-days: 3
- name: shutdown
if: always()
run: bash $HELPER_PATH delete
part_2:
runs-on: ${{ github.event.inputs.runner }}
timeout-minutes: 300
steps:
- name: check out repo
uses: actions/checkout@v3
- name: prepare
timeout-minutes: 30
run: bash $HELPER_PATH create $VAST_API_KEY
- name: cards
timeout-minutes: 40
run: bash $HELPER_PATH run cards.py cards part-1
- name: stack
timeout-minutes: 40
run: bash $HELPER_PATH run stack.py stack part-2
- name: friction
timeout-minutes: 40
run: bash $HELPER_PATH run friction.py friction part-2
- name: collect
if: success() || failure()
run: bash $HELPER_PATH collect
- name: upload artifact
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ci-part-2
path: ci
retention-days: 3
- name: shutdown
if: always()
run: bash $HELPER_PATH delete
part_3:
runs-on: ${{ github.event.inputs.runner }}
timeout-minutes: 300
steps:
- name: check out repo
uses: actions/checkout@v3
- name: prepare
timeout-minutes: 30
run: bash $HELPER_PATH create $VAST_API_KEY
- name: twist
timeout-minutes: 40
run: bash $HELPER_PATH run twist.py twist part-3
- name: domino
timeout-minutes: 40
run: bash $HELPER_PATH run domino.py domino part-3
- name: trampoline
timeout-minutes: 40
run: bash $HELPER_PATH run trampoline.py trampoline part-3
- name: trapped
timeout-minutes: 40
run: bash $HELPER_PATH run trapped.py trapped part-1
- name: collect
if: success() || failure()
run: bash $HELPER_PATH collect
- name: upload artifact
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ci-part-3
path: ci
retention-days: 3
- name: shutdown
if: always()
run: bash $HELPER_PATH delete
notify_success:
runs-on: ubuntu-latest
needs: [part_1, part_2, part_3]
if: ${{ success() }}
steps:
- name: Slack Notification Success
uses: rtCamp/action-slack-notify@v2
if: ${{ success() }}
env:
SLACK_TITLE: Deploy / Success
SLACK_COLOR: good
SLACK_MESSAGE: All tests passed.
notify_failure:
runs-on: ubuntu-latest
needs: [part_1, part_2, part_3]
if: ${{ failure() }}
steps:
- name: Slack Notification Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deploy / Failure
SLACK_COLOR: danger
SLACK_MESSAGE: One or more tests failed.