From 463df5ceae8f47b72d14e9d31ae7608af80d1ba7 Mon Sep 17 00:00:00 2001 From: Reguel Wermelinger Date: Thu, 11 Jan 2024 09:11:48 +0100 Subject: [PATCH] test --- .github/workflows/playwright.yml | 24 ------------------------ build/Dockerfile | 8 +++++++- build/Jenkinsfile | 12 ++++++++++++ 3 files changed, 19 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/playwright.yml diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index dbf3a62..0000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Playwright Tests -on: - push: -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps chromium - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v3 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/build/Dockerfile b/build/Dockerfile index 128c63b..f8be148 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,3 +1,9 @@ -FROM node:18.17.1-bookworm +FROM mcr.microsoft.com/playwright:v1.40.1-jammy + +RUN apt-get update &&\ + apt-get install software-properties-common -y &&\ + apt-add-repository universe -y &&\ + apt-get update &&\ + apt-get install openjdk-17-jdk maven -y USER node diff --git a/build/Jenkinsfile b/build/Jenkinsfile index 80abc36..ed50638 100644 --- a/build/Jenkinsfile +++ b/build/Jenkinsfile @@ -23,6 +23,18 @@ pipeline { } } } + stage('NPM:test') { + steps { + script { + catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { + docker.build('node', '-f build/Dockerfile .').inside { + sh 'npm run test' + } + } + archiveArtifacts artifacts: 'playwright-report/**', allowEmptyArchive: false + } + } + } stage('Deploy') { when { expression { isReleaseOrMasterBranch() && currentBuild.changeSets.size() > 0 }