-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AC-93] - Testing Docker Image for AdminConsole (#25)
- Loading branch information
1 parent
e901429
commit 38b3452
Showing
2 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# 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 |
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