Skip to content

✨ link prefetch assets #311

✨ link prefetch assets

✨ link prefetch assets #311

Workflow file for this run

name: main
on: [push]
jobs:
main:
runs-on: ubuntu-latest
outputs:
published_url: ${{ steps.publish.outputs.url }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: actions/setup-node@v4
with:
node-version: 20
- run: bun install --frozen-lockfile
- run: bun build:app
- name: Publish
id: publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_PUBLISH_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: timezone-rocks
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: disclaim preview url in commit comment
uses: peter-evans/commit-comment@v2
with:
token: ${{ github.token }}
sha: ${{ github.sha }}
body: |
[preview](${{ steps.publish.outputs.url }})
- run: bun type
- run: bun lint
- run: bun test
e2e:
runs-on: ubuntu-latest
needs: [main]
strategy:
fail-fast: false
matrix:
shard: ["1/1"]
browser: [chromium]
# browser: [firefox, chromium, webkit]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: actions/setup-node@v4
with:
node-version: 20
- run: bunx playwright install ${{ matrix.browser }} --with-deps
working-directory: packages/e2e
- run: |
bunx playwright test \
--project ${{ matrix.browser }} \
--shard ${{ matrix.shard }} \
--reporter github \
--forbid-only \
--workers 1
working-directory: packages/e2e
env:
APP_URL: ${{ needs.main.outputs.published_url }}
- uses: actions/upload-artifact@v3
with:
name: playwright-screenshots-${{ matrix.browser }}
path: packages/e2e/playwright-screenshots