From 63139337d44c6bf440fd383d4ffbc175af90925c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20K=C3=B6nig?= Date: Tue, 23 Jul 2024 19:24:04 +0200 Subject: [PATCH] try new workflow config --- .github/workflows/test.yml | 9 +++++++++ Makefile | 12 ++++++------ playwright.config.ts | 1 - 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c0a7fd44..0c928a02 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,5 +16,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + pull: true + file: docker/Dockerfile_ci + tags: ghcr.io/cars10/elasticvue_ci:latest + - name: run tests run: make CI=1 ci diff --git a/Makefile b/Makefile index e9603ac8..184a44fa 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ CI ?= +CI_IMAGE=ghcr.io/cars10/elasticvue_ci:latest build_docker_ci: - docker build -f docker/Dockerfile_ci -t elasticvue-ci . + docker build -f docker/Dockerfile_ci -t ${CI_IMAGE} . ci: build_docker_ci - cat /proc/cpuinfo - docker run --rm elasticvue-ci yarn lint - docker run --rm elasticvue-ci yarn tsc - docker run --rm elasticvue-ci yarn test:unit - docker run --rm -e CI="$(CI)" -v ./playwright-report-ci:/app/playwright-report elasticvue-ci yarn test:e2e:all + docker run --rm ${CI_IMAGE} yarn lint + docker run --rm ${CI_IMAGE} yarn tsc + docker run --rm ${CI_IMAGE} yarn test:unit + docker run --rm -e CI="$(CI)" -v ./playwright-report-ci:/app/playwright-report ${CI_IMAGE} yarn test:e2e:all build_tauri: yarn tauri:build diff --git a/playwright.config.ts b/playwright.config.ts index 7bcc530b..5714a7f9 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -17,7 +17,6 @@ export default defineConfig({ forbidOnly: !!process.env.CI, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, - /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 2 : 16, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [['html', { open: 'never' }]],