-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Reactivating Review Apps to check if it works. #407
- Loading branch information
1 parent
b8aee0e
commit 4fe9b8e
Showing
1 changed file
with
60 additions
and
60 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 |
---|---|---|
|
@@ -61,68 +61,68 @@ jobs: | |
|
||
|
||
|
||
# # DEPLOY THE REVIEW APP | ||
# # This will deploy an app to fly.io with the name 'mvp-pr-$PR_NUMBER' (check `review-apps.sh` script). | ||
# review_app: | ||
|
||
# # Only run when it's not a dependabot PR | ||
# if: github.event.pull_request.user.login != 'dependabot[bot]' | ||
|
||
# name: Review App Job | ||
# runs-on: ubuntu-latest | ||
# # needs: [build] | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Install flyctl | ||
# uses: superfly/flyctl-actions/setup-flyctl@master | ||
|
||
# - name: Set up Elixir | ||
# uses: erlef/setup-beam@v1 | ||
# with: | ||
# otp-version: 24.3.4 | ||
# elixir-version: 1.14.1 | ||
|
||
# - name: Run Review App Script | ||
# run: ./.github/scripts/review-apps.sh | ||
# env: | ||
# ENCRYPTION_KEYS: ${{ secrets. ENCRYPTION_KEYS }} | ||
# AUTH_API_KEY: ${{ secrets.FLY_AUTH_API_KEY }} | ||
# APP_NAME: ${{ format('mvp-pr-{0}', github.event.number) }} | ||
# EVENT_ACTION: ${{ github.event.action }} | ||
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
# FLY_ORG: dwyl-mvp | ||
# FLY_REGION: lhr | ||
# FLY_POSTGRES_NAME: mvp-db | ||
# DEPLOY THE REVIEW APP | ||
# This will deploy an app to fly.io with the name 'mvp-pr-$PR_NUMBER' (check `review-apps.sh` script). | ||
review_app: | ||
|
||
# Only run when it's not a dependabot PR | ||
if: github.event.pull_request.user.login != 'dependabot[bot]' | ||
|
||
name: Review App Job | ||
runs-on: ubuntu-latest | ||
# needs: [build] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install flyctl | ||
uses: superfly/flyctl-actions/setup-flyctl@master | ||
|
||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: 24.3.4 | ||
elixir-version: 1.14.1 | ||
|
||
- name: Run Review App Script | ||
run: ./.github/scripts/review-apps.sh | ||
env: | ||
ENCRYPTION_KEYS: ${{ secrets. ENCRYPTION_KEYS }} | ||
AUTH_API_KEY: ${{ secrets.FLY_AUTH_API_KEY }} | ||
APP_NAME: ${{ format('mvp-pr-{0}', github.event.number) }} | ||
EVENT_ACTION: ${{ github.event.action }} | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
FLY_ORG: dwyl-mvp | ||
FLY_REGION: lhr | ||
FLY_POSTGRES_NAME: mvp-db | ||
|
||
|
||
# API DEFINITION TESTING - https://docs.hoppscotch.io/cli | ||
# NOTE: The tests are executed sequentially in each folder | ||
# but all the sequence of folders are run in reverse order of what's displayed in the GUI. | ||
# We've made use of env variables to make it work. Take this into account if you want to add more requests. | ||
# api_definition: | ||
|
||
# # Only run when not closed | ||
# if: github.event.pull_request.action != 'closed' | ||
|
||
# name: API Definition Tests | ||
# runs-on: ubuntu-latest | ||
# needs: [review_app] | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
|
||
# # After the app is deployed, we need to change the host | ||
# # in the `lib/api/fly_dev.json` so the API tests work and target the deployed app. | ||
# - name: Update lib/api/fly_dev.json description | ||
# uses: jossef/[email protected] | ||
# with: | ||
# file: ./lib/api/fly_dev.json | ||
# field: host | ||
# value: ${{ format('https://mvp-pr-{0}.fly.dev', github.event.number) }} | ||
|
||
# - name: Install Hoppscotch CLI | ||
# run: npm i -g @hoppscotch/[email protected] | ||
|
||
# - name: Running server and Hoppscotch Tests | ||
# run: hopp test -e ./lib/api/fly_dev.json ./lib/api/MVP.json | ||
api_definition: | ||
|
||
# Only run when not closed | ||
if: github.event.pull_request.action != 'closed' | ||
|
||
name: API Definition Tests | ||
runs-on: ubuntu-latest | ||
needs: [review_app] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# After the app is deployed, we need to change the host | ||
# in the `lib/api/fly_dev.json` so the API tests work and target the deployed app. | ||
- name: Update lib/api/fly_dev.json description | ||
uses: jossef/[email protected] | ||
with: | ||
file: ./lib/api/fly_dev.json | ||
field: host | ||
value: ${{ format('https://mvp-pr-{0}.fly.dev', github.event.number) }} | ||
|
||
- name: Install Hoppscotch CLI | ||
run: npm i -g @hoppscotch/[email protected] | ||
|
||
- name: Running server and Hoppscotch Tests | ||
run: hopp test -e ./lib/api/fly_dev.json ./lib/api/MVP.json |