build: Run automation tests in docker (#4715)

[skip ci]
This commit is contained in:
Jamie 2022-08-03 20:08:15 +01:00 committed by GitHub
commit aa532457f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 385 additions and 12 deletions

View file

@ -34,16 +34,28 @@ jobs:
- name: Install Frontend Deps
run: yarn --cwd ./src/Ombi/ClientApp install
- name: Start Frontend
run: |
nohup yarn --cwd ./src/Ombi/ClientApp start &
- name: Build Frontend
run: yarn --cwd ./src/Ombi/ClientApp build
- name: Install Automation Deps
run: yarn --cwd ./tests install
- name: Build Docker Image
run: docker build -t ombi src/
- name: Start Backend
run: |
nohup dotnet run --project ./src/Ombi -- --host http://*:3577 &
- name: Run Docker Image
run: nohup docker run --rm -p 5000:5000 ombi &
- name: Sleep for server to start
run: sleep 20
# - name: Start Frontend
# run: |
# nohup yarn --cwd ./src/Ombi/ClientApp start &
# - name: Install Automation Deps
# run: yarn --cwd ./tests install
# - name: Start Backend
# run: |
# nohup dotnet run --project ./src/Ombi -- --host http://*:3577 &
- name: Cypress Tests
uses: cypress-io/github-action@v2.8.2
@ -52,9 +64,9 @@ jobs:
browser: chrome
headless: true
working-directory: tests
wait-on: http://localhost:3577/
wait-on: http://localhost:5000/
# 10 minutes
wait-on-timeout: 600
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}