I am looking for a way to be able to spin up a couple of apps, run some end to end tests, then spin down the apps. Is machines a good way to achieve this?
I have this Github Action file I am testing with, does anyone have any examples of how to achieve this? One complexity I have, is that I would need to also do is create a machine for an app in a different repo, is it possible for me to do this?
name: Deploy Development
on:
push:
branches:
- main
env:
{MY_SECRETS}
jobs:
deploy_testing:
name: Deploy to Testing
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Setup & Deploy Machine
run: flyctl {FLY COMMAND}
end_to_end:
needs: [deploy_testing]
name: End To End Tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- name: Run Cypress Tests
uses: cypress-io/github-action@v2
with:
browser: chrome
headless: true
record: true
wait-on: {INSERT_URL_VARIABLE_HERE}
config: defaultCommandTimeout=30000,baseUrl={INSERT_URL_VARIABLE_HERE}
cache-key: cypress-hash-${{ hashFiles('yarn.lock') }}