-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (43 loc) · 1.89 KB
/
system-integration-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
name: System integration tests
on:
workflow_dispatch:
inputs:
testenvironment:
description: "Select the test environment (tt02 or at22)"
required: true
default: at22
type: choice
options:
- at22
- at23
- at24
- tt02
env:
DOTNET_VERSION: '8.0.x'
jobs:
build-and-run-integration-tests:
name: >
Environment: ${{ github.event.inputs.testenvironment }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore test/Altinn.Platform.Authentication.SystemIntegrationTests/Altinn.Platform.Authentication.SystemIntegrationTests.csproj
- name: Build
run: dotnet build test/Altinn.Platform.Authentication.SystemIntegrationTests/Altinn.Platform.Authentication.SystemIntegrationTests.csproj --configuration Release --no-restore
- name: Test
run: dotnet test test/Altinn.Platform.Authentication.SystemIntegrationTests/Altinn.Platform.Authentication.SystemIntegrationTests.csproj --no-restore --logger:"console;verbosity=detailed"
env:
SYSTEMINTEGRATIONTEST_JSON: ${{ secrets.SYSTEMINTEGRATIONTEST_JSON }}
TEST_ENVIRONMENT: ${{ github.event.inputs.testenvironment }}
- name: Notify Slack on Failure
if: failure() # This step runs only if the previous steps fail
run: |
curl -X POST -H 'Content-type: application/json' --data '{
"text": "Tester feilet i testmiljø:`${{ github.event.inputs.testenvironment }}` på repo: `${{ github.repository }}`. Mer detaljer her: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}' ${{ secrets.SLACK_WEBHOOK_URL }}