forked from Ed-Fi-Alliance-OSS/Ed-Fi-ODS-AdminApp
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (92 loc) · 3.84 KB
/
aa-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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
name: Admin App E2E Tests
on:
push:
branches: [main]
workflow_dispatch:
pull_request:
branches:
- main
paths:
- "Application/**/*.cs"
- "Application/EdFi.Ods.AdminApp.E2E.Tests"
- ".github/workflows/aa-e2e.yml"
- "!Application/EdFi.Ods.Admin.Api" # Need to remove this extra check after we remove EdFi.Ods.Admin.Api project
permissions: read-all
jobs:
run-e2e-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: main
- name: Get ODS Docker
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Docker
path: ods-docker
ref: main-6x
- name: Copy files to Docker repo
run: |
cp -r ./main/eng/test-certs/ssl ./ods-docker
- name: Update Admin App Docker package versions
run: |
chmod +x ./main/Application/EdFi.Ods.AdminApp.E2E.Tests/gh-action-setup/set-versions.sh
./main/Application/EdFi.Ods.AdminApp.E2E.Tests/gh-action-setup/set-versions.sh
- name: Run ODS
run: docker compose -f ./main/Application/EdFi.Ods.AdminApp.E2E.Tests/gh-action-setup/compose-aa-build.yml --env-file ./main/Application/EdFi.Ods.AdminApp.E2E.Tests/gh-action-setup/.automation.env up -d
- name: Verify ODS Health
run: |
chmod +x ./main/Application/EdFi.Ods.AdminApp.E2E.Tests/gh-action-setup/inspect.sh
./main/Application/EdFi.Ods.AdminApp.E2E.Tests/gh-action-setup/inspect.sh
- name: Setup node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: "18"
- name: Install dependencies
run: npm ci
working-directory: main/Application/EdFi.Ods.AdminApp.E2E.Tests
- name: Install OS dependencies
run: npx playwright install-deps
working-directory: main/Application/EdFi.Ods.AdminApp.E2E.Tests
- name: Set environment
run: mv .env.example .env
working-directory: main/Application/EdFi.Ods.AdminApp.E2E.Tests
- name: Run tests
run: npm run report
working-directory: main/Application/EdFi.Ods.AdminApp.E2E.Tests
- name: Get Docker logs
if: failure()
run: |
mkdir docker-logs
docker logs ed-fi-db-admin > docker-logs/ed-fi-db-admin.log
docker logs ed-fi-ods-adminapp > docker-logs/ed-fi-adminapp.log
docker logs ed-fi-ods-api > docker-logs/ed-fi-ods-api.log
- name: Upload Docker logs
if: failure()
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: docker-logs
path: docker-logs/
retention-days: 10
- name: Transform results
if: success() || failure()
run: python ./resultparser.py
working-directory: main/Application/EdFi.Ods.AdminApp.E2E.Tests
- name: Upload results
if: success() || failure()
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: test-results
path: main/Application/EdFi.Ods.AdminApp.E2E.Tests/reports/playwright-results.xml
retention-days: 5
- name: Upload execution traces
if: failure()
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: playwright-execution-traces
path: main/Application/EdFi.Ods.AdminApp.E2E.Tests/traces
retention-days: 5