Skip to content

Commit

Permalink
EASI-3236: init skip_tests feature for manual deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Jdwoodson committed Sep 20, 2023
1 parent 2cc36a9 commit 4d810c5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/manual_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
- test
- impl
- prod
skip_tests:
required: true
default: false
type: boolean
description: Skip tests?
confirm_production_deploy:
required: true
default: false
Expand All @@ -27,6 +32,8 @@ jobs:
run_tests:
uses: ./.github/workflows/run_tests.yml
secrets: inherit
with:
skip_tests: ${{ inputs.skip_tests }}

build_frontend_assets:
uses: ./.github/workflows/build_frontend_assets.yml
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Run Tests

on:
workflow_call:
inputs:
skip_tests:
description: 'Skip tests'
type: boolean
required: false
default: false

env:
GIT_HASH: ${{ github.event.pull_request.head.sha || github.sha }}
Expand All @@ -15,8 +21,15 @@ env:
S3_BUCKET: mint-app-file-uploads

jobs:

skip_tests:
if: ${{ inputs.skip_tests == true }}
runs-on: ubuntu-latest
steps:
- name: Skipping tests
run: |
echo "Skipping tests!"
build_docker_images:
if: ${{ inputs.skip_tests == false }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
Expand Down Expand Up @@ -53,6 +66,7 @@ jobs:
# This is largely a copy of build_frontend_assets, but it doesn't use an `environment` block
build_frontend_assets:
if: ${{ inputs.skip_tests == false }}
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down Expand Up @@ -89,6 +103,7 @@ jobs:
./scripts/github-action-announce-broken-branch
server_test:
if: ${{ inputs.skip_tests == false }}
runs-on: ubuntu-latest
services:
postgres:
Expand Down Expand Up @@ -186,6 +201,7 @@ jobs:
./scripts/github-action-announce-broken-branch
e2e_tests:
if: ${{ inputs.skip_tests == false }}
runs-on: ubuntu-latest
continue-on-error: true
needs: [build_docker_images, build_frontend_assets]
Expand Down Expand Up @@ -280,6 +296,7 @@ jobs:
./scripts/github-action-announce-broken-branch
lint:
if: ${{ inputs.skip_tests == false }}
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down Expand Up @@ -316,6 +333,7 @@ jobs:
./scripts/github-action-announce-broken-branch
client_test:
if: ${{ inputs.skip_tests == false }}
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand All @@ -339,6 +357,7 @@ jobs:
./scripts/github-action-announce-broken-branch
client_typecheck:
if: ${{ inputs.skip_tests == false }}
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down

0 comments on commit 4d810c5

Please sign in to comment.