Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AC-93] - Testing Docker Image for AdminConsole #25

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
},
});
Loading