From 8c78d955431c3ecef41181ddc3d55600f52a44b1 Mon Sep 17 00:00:00 2001 From: aacic Date: Mon, 7 Oct 2024 11:20:37 -0400 Subject: [PATCH] Run integration tests when building the deps image Run integration tests when building the deps image --- .github/workflows/CD-publish-deps-image.yml | 28 ++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CD-publish-deps-image.yml b/.github/workflows/CD-publish-deps-image.yml index f219b9cb1..54f087005 100644 --- a/.github/workflows/CD-publish-deps-image.yml +++ b/.github/workflows/CD-publish-deps-image.yml @@ -32,6 +32,7 @@ jobs: build: needs: check-user-permissions + timeout-minutes: 80 if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: @@ -53,6 +54,25 @@ jobs: registry-url: 'https://registry.npmjs.org' scope: '@sjcrh' + - name: Run npm ci + run: npm ci + + - name: Copy serverconfig.json to root + run: | + cp container/ci/serverconfig.json container/ + + - name: Create cache folder + run: mkdir cache + + - name: Install xvfb + run: sudo apt-get install xvfb + + - name: TSC + run: | + cd server + npx tsc + cd .. + - name: Build image run: | npm install glob @@ -68,13 +88,19 @@ jobs: TAG="$(node -p "require('./package.json').version")" cd .. + ./run.sh ghcr.io/stjude/ppserver:$TAG + sleep 10 + cd .. + xvfb-run --auto-servernum npm run test:integration + HASH=$(git rev-parse --short HEAD 2>/dev/null) docker push ghcr.io/stjude/ppbase:latest docker push ghcr.io/stjude/ppserver:$TAG docker push ghcr.io/stjude/ppfull:$TAG docker push ghcr.io/stjude/ppserver:latest docker push ghcr.io/stjude/ppfull:latest - + + cd container ./update_deps_version.sh $TAG ./full/Dockerfile ./update_deps_version.sh $TAG ./server/Dockerfile