Skip to content

All Examples

All Examples #66

Workflow file for this run

# File: vast-all.yml
# Author: Ryoichi Ando (ryoichi.ando@zozo.com)
# 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: 20
run: bash $HELPER_PATH create $VAST_API_KEY
- name: hang
run: bash $HELPER_PATH run hang.py
- name: needle
run: bash $HELPER_PATH run needle.py
- name: curtain
run: bash $HELPER_PATH run curtain.py
- name: drape
run: bash $HELPER_PATH run drape.py
- name: trapped
run: bash $HELPER_PATH run trapped.py
- name: cards
run: bash $HELPER_PATH run cards.py
- 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: 20
run: bash $HELPER_PATH create $VAST_API_KEY
- name: stack
run: bash $HELPER_PATH run stack.py
- 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: 20
run: bash $HELPER_PATH create $VAST_API_KEY
- name: friction
run: bash $HELPER_PATH run friction.py
- name: shutdown
if: always()
run: bash $HELPER_PATH delete
part_4:
runs-on: ${{ github.event.inputs.runner }}
timeout-minutes: 300
steps:
- name: check out repo
uses: actions/checkout@v3
- name: prepare
timeout-minutes: 20
run: bash $HELPER_PATH create $VAST_API_KEY
- name: twist
run: bash $HELPER_PATH run twist.py
- name: domino
run: bash $HELPER_PATH run domino.py
- name: trampoline
run: bash $HELPER_PATH run trampoline.py
- name: shutdown
if: always()
run: bash $HELPER_PATH delete
notify_success:
runs-on: ${{ github.event.inputs.runner }}
needs: [part_1, part_2, part_3, part_4]
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: ${{ github.event.inputs.runner }}
needs: [part_1, part_2, part_3, part_4]
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.