Skip to content

fix(app/components/menu): scroll through long list #883

fix(app/components/menu): scroll through long list

fix(app/components/menu): scroll through long list #883

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
- prod
pull_request:
merge_group:
jobs:
lint:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: package.json
cache: pnpm
- name: Download deps
run: pnpm install --frozen-lockfile
# Linting fails in CI because `~/styles/tailwind.css` does not exist and
# thus my `import/order` rule errors (because it doesn't mark that as a
# local import as the file doesn't exist). This addresses that.
- name: Stub imported css
run: mkdir app/styles && touch app/styles/tailwind.css
- name: Generate prisma
run: pnpm prisma generate --generator js
- name: Lint
run: pnpm lint
typecheck:
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: package.json
cache: pnpm
- name: Download deps
run: pnpm install --frozen-lockfile
- name: Generate prisma
run: pnpm prisma generate --generator js
- name: Type check
run: pnpm typecheck
vitest:
name: Vitest
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: package.json
cache: pnpm
- name: Download deps
run: pnpm install --frozen-lockfile
- name: Run vitest
run: pnpm test -- --coverage
cypress:
name: Cypress
runs-on: ubuntu-latest
env:
PORT: '8811'
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: package.json
cache: pnpm
- name: Cache cypress binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Download deps
run: pnpm install --frozen-lockfile
- name: Download cypress binary
run: pnpm cypress install
- name: Copy test env vars
run: cp .env.example .env
- name: Docker compose
# the sleep is just there to give time for postgres to get started
run: docker-compose --env-file .env up -d && sleep 3
- name: Setup database
run: pnpm prisma migrate reset --force --skip-seed --skip-generate
- name: Build
run: pnpm build
- name: Start frontend
id: startfrontend
run: |
pnpm start:mocks > frontend.log 2>&1 &
echo $! > frontend_pid.txt
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
- name: Wait for frontend
run: pnpm wait-on --timeout 60000 http://localhost:${{ env.PORT }}
- name: Run cypress tests
run: pnpm cypress run --record --tag ${{ github.event_name }} --spec cypress/e2e/smoke.cy.ts
env:
# testing keys (e.g. cypress) and other environment variables.
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# override the github commit message for better Cypress Cloud mesages.
# @see https://github.com/cypress-io/github-action/issues/124#issuecomment-653180260
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
# re-enable the Cypress GitHub PR comment bot
# @see https://docs.cypress.io/guides/continuous-integration/github-actions#Pull-requests-commit-message-is-merge-SHA-into-SHA
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }}
- name: Kill frontend
if: ${{ always() && steps.startfrontend.outcome == 'success' }}
run: |
frontend_pid=$(cat frontend_pid.txt)
kill $frontend_pid
- name: Display frontend logs
if: always()
run: |
cat frontend.log
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
flavor: |
latest=auto
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
# only upload main branch (on pushes) to GHCR. otherwise, just check
# to ensure that the docker build completes without error.
push: ${{ (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/prod') && github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max