Remove unused configurations #93
This file contains 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: Node CI | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
NODE_ENV: test | |
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/placemark_test | |
NEXT_PUBLIC_FILE_WARN_MB: 5 | |
NEXT_PUBLIC_FILE_LIMIT_MB: 5 | |
PUSHER_SERVER_INTERNAL_ADDRESS: xxx | |
NEXT_PUBLIC_STRIPE_PRICE_ID_ENTERPRISE: xx | |
PUSHER_SERVER_INTERNAL_PORT: xxx | |
NEXT_PUBLIC_POSTHOG_API_HOST: xxx | |
NEXT_PUBLIC_POSTHOG_API_TOKEN: xxx | |
NEXT_PUBLIC_MAPBOX_TOKEN: pk.eyJ1IjoidG1jdyIsImEiOiJja2twd25qdWowMXBuMnVxdDZodXJzaDZoIn0.UL4e2OtC7xrGr9hohU1odg | |
BLOG_RSS_URL: xxx | |
WFC_QUOTA: 10 | |
WFC_QUOTA_ENTERPRISE: 100 | |
TEAM_EMAIL: foo@bar.com | |
DOMAIN: test.local | |
CAMPAIGNMONITOR_KEY: xxx | |
CYPRESS_INSTALL_BINARY: 0 | |
GITHUB_CLIENT_ID: xx | |
GITHUB_CLIENT_SECRET: xx | |
strategy: | |
matrix: | |
node-version: [20.x] | |
services: | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- uses: actions/cache@v4 | |
id: cache-next | |
with: | |
path: ${{ github.workspace }}/.next/cache | |
# Generate a new cache whenever packages or source files change. | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]sx?') }} | |
# If source files changed but packages didn't, rebuild from a prior cache. | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- | |
- name: Install packages | |
run: | | |
pnpm i | |
- name: Migrate DB & generate prisma client | |
run: pnpm blitz prisma migrate dev | |
working-directory: packages/placemark-app | |
- name: Lint | |
run: | | |
pnpm -r run lint | |
- name: Run tests with coverage | |
run: | | |
pnpm -r run test |