Skip to content

Commit

Permalink
(chore) Add remote caching to E2E workflow using turborepo-gh-artifac…
Browse files Browse the repository at this point in the history
…ts (#308)
  • Loading branch information
denniskigen authored Jul 2, 2024
1 parent 6935fa9 commit 938b640
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
branches:
- main

env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: ${{ secrets.TURBO_SERVER_TOKEN }}
TURBO_TEAM: ${{ github.repository_owner }}

jobs:
run_e2e_tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,8 +43,14 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps

- name: Setup local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

- name: Build app
run: yarn turbo run build
run: yarn turbo run build --color

- name: Run dev server
run: bash e2e/support/github/run-e2e-docker-env.sh
Expand All @@ -51,7 +62,7 @@ jobs:
run: yarn playwright test

- name: Stop dev server
if: "!cancelled()"
if: '!cancelled()'
run: docker stop $(docker ps -a -q)

- name: Upload Report
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "https://turbo.build/schema.json",
"ui": "stream",
"tasks": {
"build": {
"outputs": [
Expand Down

0 comments on commit 938b640

Please sign in to comment.