-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (49 loc) · 2.18 KB
/
ci-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "CI Build: E2E tests"
on:
push:
branches:
- "main"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 45
env:
SERVAL_CLIENT_ID: ${{ secrets.SERVAL_CLIENT_ID }}
SERVAL_CLIENT_SECRET: ${{ secrets.SERVAL_CLIENT_SECRET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ClearML_AccessKey: ${{ secrets.ClearML_AccessKey }}
ClearML_SecretKey: ${{ secrets.ClearML_SecretKey }}
SERVAL_HOST_URL: http://localhost
SERVAL_AUTH_URL: https://sil-appbuilder.auth0.com
# ASPNETCORE_ENVIRONMENT: Development
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Get Machine
run: cd .. && git clone https://github.com/sillsdev/machine.git && cd machine && dotnet build && cd ../serval && dotnet build
- name: Restore dotnet tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Start containers
run: docker compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly
- name: Debug network
run: docker ps -a && docker logs --since 10m serval_cntr && docker logs --since 10m echo_cntr && docker logs --since 10m machine-engine-cntr && docker logs --since 10m serval-mongo-1 && docker logs --since 10m machine-job-cntr
- name: Pre-Test
run: sudo mkdir -p /var/lib/serval && sudo chmod 777 /var/lib/serval
- name: Test
run: dotnet test --no-build --verbosity normal --filter "TestCategory!=slow&TestCategory=E2E"
- name: Debug network (Post test)
if: ${{ failure() }}
run: docker ps -a && docker logs --since 10m serval_cntr && docker logs --since 10m echo_cntr && docker logs --since 10m machine-engine-cntr && docker logs --since 10m serval-mongo-1 && docker logs --since 10m machine-job-cntr
- name: Stop containers
if: ${{ success() || failure() }}
run: docker compose down