[AC-93] - Testing Docker Image for AdminConsole #1
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 Console E2E Tests | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
permissions: read-all | |
jobs: | |
setup-environment: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
path: main | |
- name: Set environment | |
run: mv .env.example .env | |
working-directory: ./main/docker/Compose/ | |
- name: Run Admin Console | |
run: | | |
docker compose -f docker/Compose/compose-build-dev.yml --env-file docker/Compose/.env up -d | |
working-directory: ./main/ | |
- name: Setup node | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: "20" | |
- name: Intall project dependencies | |
run: npm install | |
working-directory: ./main/ | |
- name: Install playwright dependencies | |
run: npx playwright install | |
working-directory: ./main/ | |
- name: Run test | |
run: npm run tests | |
working-directory: ./main/ | |
- name: Get Docker logs | |
if: failure() | |
run: | | |
mkdir docker-logs | |
docker logs adminconsole > docker-logs/adminconsole.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 |