Skip to content

Commit

Permalink
ci(workflows/main): upload dist directory and download it on e2e job
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnigos committed Aug 29, 2024
1 parent 0969d6b commit acf7ac9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ jobs:
AUTH_GITHUB_SECRET: secret
AUTH_SECRET: secret

- run: mkdir tmp-dir && mv .next tmp-dir/ && mv tmp-dir .next
- name: Upload production artifact 📤
uses: actions/upload-artifact@v4
with:
name: dist
path: ./.next

lint:
name: 'Lint 🐱'
needs: build
Expand All @@ -55,7 +62,7 @@ jobs:
AUTH_SECRET: secret

test:
name: 'Test 🧪'
name: 'Unit Tests 🧪'
needs: build
runs-on: ubuntu-latest

Expand All @@ -77,7 +84,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

e2e:
name: 'E2E 🧪'
name: 'E2E Tests 🧪'
needs: build
runs-on: ubuntu-latest

Expand All @@ -93,6 +100,14 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Download production artifact 📤
uses: actions/download-artifact@v4
with:
name: dist

- name: log dist
run: ls

- name: Run e2e tests 🧪
run: npx playwright test
env:
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default defineConfig({
},
],
webServer: {
command: 'bun start',
command: 'npx next start',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
},
Expand Down

0 comments on commit acf7ac9

Please sign in to comment.