mirror of https://github.com/Ombi-app/Ombi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.9 KiB
81 lines
1.9 KiB
4 years ago
|
name: Automation Tests
|
||
4 years ago
|
|
||
|
on:
|
||
|
push:
|
||
4 years ago
|
branches: [ develop, feature/** ]
|
||
4 years ago
|
pull_request:
|
||
4 years ago
|
branches: [ develop ]
|
||
4 years ago
|
schedule:
|
||
4 years ago
|
- cron: '0 0 * * *'
|
||
3 years ago
|
workflow_dispatch:
|
||
4 years ago
|
|
||
|
jobs:
|
||
4 years ago
|
automation-tests:
|
||
4 years ago
|
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- name: Setup .NET
|
||
|
uses: actions/setup-dotnet@v1
|
||
|
with:
|
||
3 years ago
|
dotnet-version: 6.0.x
|
||
4 years ago
|
- uses: actions/setup-node@v2
|
||
4 years ago
|
with:
|
||
2 years ago
|
node-version: '18'
|
||
4 years ago
|
|
||
4 years ago
|
- uses: actions/cache@v2
|
||
|
with:
|
||
4 years ago
|
path: |
|
||
|
'**/node_modules'
|
||
4 years ago
|
'/home/runner/.cache/Cypress'
|
||
4 years ago
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||
|
|
||
|
- name: Install Frontend Deps
|
||
4 years ago
|
run: yarn --cwd ./src/Ombi/ClientApp install
|
||
|
|
||
2 years ago
|
- name: Build Frontend
|
||
|
run: yarn --cwd ./src/Ombi/ClientApp build
|
||
2 years ago
|
|
||
2 years ago
|
- name: Build Docker Image
|
||
|
run: docker build -t ombi src/
|
||
4 years ago
|
|
||
2 years ago
|
- name: Run Docker Image
|
||
|
run: nohup docker run --rm -p 5000:5000 ombi &
|
||
|
|
||
1 year ago
|
- name: Run Wiremock
|
||
|
run: nohup docker run --rm -p 32400:8080 --name wiremock wiremock/wiremock:2.35.0 &
|
||
2 years ago
|
|
||
2 years ago
|
- 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 &
|
||
2 years ago
|
|
||
4 years ago
|
- name: Cypress Tests
|
||
1 year ago
|
uses: cypress-io/github-action@v4
|
||
4 years ago
|
with:
|
||
4 years ago
|
record: true
|
||
4 years ago
|
browser: chrome
|
||
|
headless: true
|
||
4 years ago
|
working-directory: tests
|
||
2 years ago
|
wait-on: http://localhost:5000/
|
||
2 years ago
|
# 10 minutes
|
||
|
wait-on-timeout: 600
|
||
4 years ago
|
env:
|
||
4 years ago
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||
2 years ago
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
1 year ago
|
|
||
|
- name: Stop Docker
|
||
|
if: always()
|
||
|
run: |
|
||
|
docker ps -q | xargs -I {} docker logs {}
|
||
|
docker container kill $(docker ps -q)
|