[AA-1772] Fix Admin App E2E Tests #399
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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-latest | |
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@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.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: 10 | |
- 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: 10 |