enable biome lint, try 2 #262
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.2 | |
| - name: get build info | |
| id: build_info | |
| run: echo timestamp=$(git show -s --format=%cI) >> $GITHUB_OUTPUT | |
| - run: bun install | |
| - run: bun run build:production | |
| env: | |
| VITE_APP_GIT_SHA: ${{ github.sha }} | |
| VITE_APP_GIT_TIMESTAMP: ${{ steps.build_info.outputs.timestamp }} | |
| - name: Upload built project | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./dist | |
| overwrite: true | |
| retention-days: 1 | |
| name: build-artifacts-${{ github.run_id }} | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.2 | |
| - run: | | |
| bun install | |
| node ./node_modules/puppeteer/install.js || true | |
| - run: bun run build:development | |
| - name: Lint | |
| run: bun run lint | |
| - name: Run unit tests | |
| run: bun run test | |
| - name: Run end-to-end tests | |
| run: bun run test-puppeteer-build | |
| # bundle_size: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v3 | |
| # - uses: ./.github/actions/setup-pnpm | |
| # - uses: preactjs/compressed-size-action@v2 | |
| # with: | |
| # repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| # build-script: build:production | |
| # pattern: "./dist/assets/*.{css,js}" | |
| # strip-hash: "\\b-\\w{8}" | |
| # minimum-change-threshold: 100 | |
| lighthouse: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.2 | |
| - run: bun install | |
| - run: bun run build:production | |
| - name: run Lighthouse CI | |
| run: bunx @lhci/cli@0.12.x autorun | |
| env: | |
| LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | |
| docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/commaai/connect | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=ref,event=branch | |
| type=ref,event=pr,prefix= | |
| type=sha,format=long,prefix= | |
| env: | |
| DOCKER_METADATA_PR_HEAD_SHA: true | |
| - name: get date | |
| run: echo "GIT_TIMESTAMP=$(git show -s --format=%cI)" >> $GITHUB_ENV | |
| - uses: docker/build-push-action@v5 | |
| with: | |
| build-args: | | |
| VITE_APP_GIT_SHA=${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }} | |
| VITE_APP_GIT_TIMESTAMP=${{ env.GIT_TIMESTAMP }} | |
| SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_RELEASE=${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }} | |
| builder: ${{ steps.buildx.outputs.name }} | |
| context: . | |
| pull: true | |
| push: ${{ github.ref == 'refs/heads/master' && github.repository == 'commaai/connect' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |