Skip to content

Commit

Permalink
chore(repo): Turbo summarize unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tmilewski committed Nov 3, 2023
1 parent a58ba57 commit 84689f4
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 55 deletions.
122 changes: 68 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
name: Formatting, linting & changeset checks
runs-on: ${{ vars.RUNNER_LARGE }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}

env:
TURBO_SUMMARIZE: true

Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
if: ${{ env.TURBO_SUMMARIZE == 'true' }}
continue-on-error: true
with:
name: turbo-summary-report-${{ github.run_id }}-${{ github.run_attempt }}
name: turbo-summary-report-lint-${{ github.run_id }}-${{ github.run_attempt }}
path: .turbo/runs
retention-days: 1

Expand All @@ -85,6 +86,9 @@ jobs:
runs-on: ${{ vars.RUNNER_LARGE }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}

env:
TURBO_SUMMARIZE: true

strategy:
matrix:
node-version: [ 18, 20 ]
Expand All @@ -102,6 +106,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
turbo-summarize: ${{ env.TURBO_SUMMARIZE }}
turbo-team: ${{ vars.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}

Expand All @@ -110,58 +115,67 @@ jobs:
env:
NODE_VERSION: ${{ matrix.node-version }}

integration-tests:
name: Integration Tests
needs: formatting-linting
runs-on: ${{ vars.RUNNER_LARGE }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}

strategy:
matrix:
test-name: [ 'generic', 'nextjs', 'remix' ]

steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false

- name: Setup
id: config
uses: ./.github/actions/init
with:
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
turbo-team: ${{ vars.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
playwright-enabled: true

- name: Verdaccio
uses: ./.github/actions/verdaccio
- name: Upload Turbo Summary
uses: actions/upload-artifact@v3
if: ${{ env.TURBO_SUMMARIZE == 'true' }}
continue-on-error: true
with:
publish-cmd: |
if [ "$(npm config get registry)" = "https://registry.npmjs.org/" ]; then echo 'Error: Using default registry' && exit 1; else npx turbo build $TURBO_ARGS && npx changeset publish --no-git-tag; fi
- name: Install @clerk/backend in /integration
working-directory: ./integration
run: npm init -y && npm install @clerk/backend

- name: Install @clerk/clerk-js in os temp
working-directory: ${{runner.temp}}
run: mkdir clerk-js && cd clerk-js && npm init -y && npm install @clerk/clerk-js
name: turbo-summary-report-unit-${{ github.run_id }}-${{ github.run_attempt }}-node-${{ matrix.node-version }}
path: .turbo/runs
retention-days: 1

- name: Run Integration Tests
run: npm run test:integration:${{ matrix.test-name }}
env:
E2E_APP_CLERK_JS_DIR: ${{runner.temp}}
E2E_CLERK_VERSION: 'latest'
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
MAILSAC_API_KEY: ${{ secrets.MAILSAC_API_KEY }}

# - name: Upload Integration Report for ${{ matrix.test-name }}
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: integration-report-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.test-name }}
# path: playwright-report/
# retention-days: 1
# integration-tests:
# name: Integration Tests
# needs: formatting-linting
# runs-on: ${{ vars.RUNNER_LARGE }}
# timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}

# strategy:
# matrix:
# test-name: [ 'generic', 'nextjs', 'remix' ]

# steps:
# - name: Checkout Repo
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# show-progress: false

# - name: Setup
# id: config
# uses: ./.github/actions/init
# with:
# turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
# turbo-team: ${{ vars.TURBO_TEAM }}
# turbo-token: ${{ secrets.TURBO_TOKEN }}
# playwright-enabled: true

# - name: Verdaccio
# uses: ./.github/actions/verdaccio
# with:
# publish-cmd: |
# if [ "$(npm config get registry)" = "https://registry.npmjs.org/" ]; then echo 'Error: Using default registry' && exit 1; else npx turbo build $TURBO_ARGS && npx changeset publish --no-git-tag; fi

# - name: Install @clerk/backend in /integration
# working-directory: ./integration
# run: npm init -y && npm install @clerk/backend

# - name: Install @clerk/clerk-js in os temp
# working-directory: ${{runner.temp}}
# run: mkdir clerk-js && cd clerk-js && npm init -y && npm install @clerk/clerk-js

# - name: Run Integration Tests
# run: npm run test:integration:${{ matrix.test-name }}
# env:
# E2E_APP_CLERK_JS_DIR: ${{runner.temp}}
# E2E_CLERK_VERSION: 'latest'
# INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
# MAILSAC_API_KEY: ${{ secrets.MAILSAC_API_KEY }}

# # - name: Upload Integration Report for ${{ matrix.test-name }}
# # uses: actions/upload-artifact@v3
# # if: always()
# # with:
# # name: integration-report-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.test-name }}
# # path: playwright-report/
# # retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
triage:
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
timeout-minutes: 3
permissions:
contents: read
pull-requests: write
Expand Down

0 comments on commit 84689f4

Please sign in to comment.