Skip to content

Commit

Permalink
[AC-93] - Testing Docker Image for AdminConsole (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpardogrowthaccelerationpartners authored Oct 28, 2024
1 parent e901429 commit 38b3452
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions .github/workflows/ac-e2e.yml
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
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ export default defineConfig({
webServer: {
command: 'npm run dev',
url: 'http://localhost:8598',
reuseExistingServer: !process.env.CI,
reuseExistingServer: true
},
});

0 comments on commit 38b3452

Please sign in to comment.