Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokio0319 committed Dec 2, 2024
1 parent 0d2ecc1 commit 2a3b039
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/10-execution-flow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 10 - Controlling the Execution Flow
on:
workflow_dispatch:
inputs:
pass-unit-tests:
type: boolean
description: Whether unit tests will pass or not
default: true
jobs:
lint-build:
runs-on: ubuntu-latest
steps:
- name: Lint and build
run: echo "Linting and building project"
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Running unit tests
run: echo "Running tests..."
- name: Failing tests
if: ${{ !inputs.pass-unit-tests }}
run: exit 1
deploy-nonprod:
runs-on: ubuntu-latest
needs:
- lint-build
- unit-tests
steps:
- name: Deploying to nonprod
run: echo "Deploying to nonprod..."
e2e-tests:
runs-on: ubuntu-latest
needs:
- deploy-nonprod
steps:
- name: Running E2E tests
run: echo "Running E2E tests"
load-tests:
runs-on: ubuntu-latest
needs:
- deploy-nonprod
steps:
- name: Running load tests
run: echo "Running load tests"
deploy-prod:
runs-on: ubuntu-latest
needs:
- e2e-tests
- load-tests
steps:
- name: Deploying to prod
run: echo "Deploying to prod..."

0 comments on commit 2a3b039

Please sign in to comment.