-
Notifications
You must be signed in to change notification settings - Fork 10
64 lines (44 loc) · 1.89 KB
/
run-tests.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: Run Backend Unit & Integration Tests
on:
pull_request:
branches: [ develop, master ]
jobs:
Unit-Tests:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal --filter FullyQualifiedName!~API.Tests
env:
App__SendGrid__ApiKey: ${{secrets.STAGING_SENDGRID_APIKEY }}
App__SendGrid__EmailFrom: [email protected]
XUnit-Integration-Tests:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Docker test compose up
run: docker-compose -f docker-compose-test.yml up --build -d
- name: Sleep for 90 seconds
uses: juliangruber/sleep-action@v1
with:
time: 90s
- name: Docker build XUnit container
run: docker build -t dex-backend_xunit -f API.Tests/Dockerfile .
- name: Run XUnit integration test container
run: docker run -e "ApiAddress=https://api:5001/" -e "IdentityAddress=http://identity:5004/" --network dex-backend_mssql-network dex-backend_xunit
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '10.15.3'
- name: Postman tests
run: npm install -g newman && newman run Postman/dex.postman_collection.json -e Postman/local.postman_environment.json --insecure --reporter-cli-no-console --reporter-cli-no-success-assertions -n 3
- name: Recommendation tests
run: npm install -g newman && newman run Postman/ElasticSearch/DeX_Elastic.postman_collection.json -e Postman/ElasticSearch/DeX_Elastic.postman_environment.json --insecure --reporter-cli-no-console --reporter-cli-no-success-assertions -n 3