diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9ddf2c3cc..d1f0d0851 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ version: 2 updates: - - package-ecosystem: "npm" + - package-ecosystem: "npm" directory: "/" schedule: interval: "daily" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61c268cc2..2883bd438 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,8 +5,47 @@ jobs: cypress-run: name: Cypress tests runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: password + POSTGRES_USER: sendou_ink + ports: + - 5432:5432 + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: - - name: Checkout + - name: Check out code uses: actions/checkout@25a956c84d5dd820d28caab9f86b8d183aeeff3d # v2 - - name: Cypress run + - name: Install Node + uses: actions/setup-node@5c355be17065acf11598c7a9bb47112fbcf2bbdc # v2 + with: + node-version: "14" + - name: Install dependencies + run: npm install + - name: Write .env file for Prisma + run: echo "DATABASE_URL=postgresql://sendou_ink:password@localhost:${{ job.services.postgres.ports[5432] }}" > prisma/.env + - name: Prep the database + run: npm run migrate + - name: Prep other resources + run: npm run compile && npm run prebuild + - name: Run prettier + run: npm run prettier:check + - name: Run Cypress uses: cypress-io/github-action@9eab5368cd2520a946489cd3f937583ff5a30443 # v2 + with: + start: npm run dev + - name: Save Cypress artifacts + uses: actions/upload-artifact@ea3d524381d563437a7d64af63f3d75ca55521c4 # v2 + if: failure() + with: + name: cypress-outputs + path: | + cypress/screenshots/* + cypress/videos/* + retention-days: 30 diff --git a/.prettierignore b/.prettierignore index df73e95cc..c7d355780 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,3 +2,7 @@ prisma/scripts/data prisma/scripts/mongo + +# Ignore JSON files generated via script +utils/data/patrons.json +locale/*/*.js diff --git a/app/calendar/components/CalendarPage.tsx b/app/calendar/components/CalendarPage.tsx index 45f928ae6..cc9100d5a 100644 --- a/app/calendar/components/CalendarPage.tsx +++ b/app/calendar/components/CalendarPage.tsx @@ -1,7 +1,7 @@ import { Button } from "@chakra-ui/button"; import { Input, InputGroup, InputLeftElement } from "@chakra-ui/input"; import { Box } from "@chakra-ui/layout"; -import { Trans } from "@lingui/macro"; +import { t, Trans } from "@lingui/macro"; import SubText from "components/common/SubText"; import { useMyTheme } from "hooks/common"; import { Fragment, useState } from "react"; @@ -9,6 +9,7 @@ import { FiSearch } from "react-icons/fi"; import { trpc } from "utils/trpc"; import EventInfo from "./EventInfo"; import { EventModal, FormData } from "./EventModal"; +import MyHead from "../../../components/common/MyHead"; export default function CalendarPage() { const { gray } = useMyTheme(); @@ -22,6 +23,7 @@ export default function CalendarPage() { return ( <> +