From 4696377ec72304beb6204c480d7cdd4a38f3dae0 Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Wed, 4 Dec 2024 15:51:17 +0400 Subject: [PATCH] chore: better way to run tests without turborepo caches --- .github/workflows/test.yml | 10 ++++ .../workflows/test_without_turbo_cache.yml | 53 ------------------- 2 files changed, 10 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/test_without_turbo_cache.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 018a8703b..22ee978a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,15 @@ name: Test on: push: + workflow_dispatch: + inputs: + turborepo_caching: + description: 'Turborepo caching' + type: choice + options: + - 'On' + - 'Off' + default: 'On' jobs: test: @@ -25,6 +34,7 @@ jobs: run: pnpm test:format - name: TurboRepo local server + if: ${{ github.event.inputs.turborepo_caching != 'Off' }} uses: felixmosh/turborepo-gh-artifacts@v2 with: server-token: 'local' diff --git a/.github/workflows/test_without_turbo_cache.yml b/.github/workflows/test_without_turbo_cache.yml deleted file mode 100644 index f82b5a4fe..000000000 --- a/.github/workflows/test_without_turbo_cache.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Test without Turbo cache -on: - workflow_dispatch: - -jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - name: Init check - if: ${{ github.repository != 'AmazeeLabs/silverback-template'}} - run: - echo 'Please run the INIT script. See the root README.md for - instructions.' && false - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup - uses: ./.github/actions/setup - - - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 - with: - server-token: 'local' - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Test - run: pnpm turbo:test:force - env: - TURBO_API: 'http://127.0.0.1:9080' - TURBO_TOKEN: 'local' - TURBO_TEAM: 'local' - - - name: 'Logs: cms' - run: cat /tmp/cms.log || true - if: always() - - name: 'Logs: website' - run: cat /tmp/website.log || true - if: always() - - name: 'Logs: preview' - run: cat /tmp/preview.log || true - if: always() - - - name: Upload Playwright report - uses: actions/upload-artifact@v4 - if: failure() - with: - name: playwright-report - path: tests/e2e/playwright-report/ - retention-days: 3