split out the install and actual tests

This commit is contained in:
tidusjar 2021-03-09 22:13:24 +00:00
commit 56e0a84fa0

View file

@ -7,7 +7,7 @@ on:
branches: [ feature/automation ] branches: [ feature/automation ]
jobs: jobs:
automation-tests: install:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -32,6 +32,25 @@ jobs:
- name: Install Automation Deps - name: Install Automation Deps
run: yarn --cwd ./tests install run: yarn --cwd ./tests install
cypress-tests:
runs-on: ubuntu-latest
needs: install
strategy:
fail-fast: false
matrix:
# run copies of the current job in parallel
containers: [1, 2]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Start Backend - name: Start Backend
run: | run: |
nohup dotnet run -p ./src/Ombi -- --host http://*:3577 & nohup dotnet run -p ./src/Ombi -- --host http://*:3577 &
@ -43,14 +62,19 @@ jobs:
- name: Cypress Tests - name: Cypress Tests
uses: cypress-io/github-action@v2.8.2 uses: cypress-io/github-action@v2.8.2
with: with:
install: false
record: true record: true
browser: chrome browser: chrome
headless: true headless: true
working-directory: tests working-directory: tests
group: "UI - Chrome"
wait-on: http://localhost:3577/ wait-on: http://localhost:3577/
parallel: true
# 7 minutes # 7 minutes
wait-on-timeout: 420 wait-on-timeout: 420
env: env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}