-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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..." |