Skip to content

Check if ready

Check if ready #56

Workflow file for this run

name: CI (Windows)
on: push
jobs:
ci:
name: CI
runs-on: windows-latest
timeout-minutes: 20
env:
PGHOST: localhost
PGDATABASE: preflight_test_project_next_js_passing
PGUSERNAME: preflight_test_project_next_js_passing
PGPASSWORD: preflight_test_project_next_js_passing
steps:
- uses: ikalnytskyi/action-setup-postgres@v5
with:
username: ${{ env.PGUSERNAME }}
password: ${{ env.PGPASSWORD }}
database: ${{ env.PGDATABASE }}
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 'latest'
# Use the official setup-node action (sets up Node.js):
# https://github.com/actions/setup-node
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
# Avoid Node.js bug with long filenames on Windows
# https://github.com/nodejs/node/issues/50753
- run: echo 'node-linker=hoisted' > ./.npmrc
shell: bash
- name: Install dependencies
run: pnpm install
- name: psql
shell: bash
run: |
PGPASSWORD=preflight_test_project_next_js_passing psql -a --echo-errors -h localhost -U preflight_test_project_next_js_passing -d preflight_test_project_next_js_passing --command 'SELECT 2'
- name: Run db.js
# Manually add back PGPASSWORD which has been cleared by ikalnytskyi/action-setup-postgres
#
# TODO: Remove when the issue is resolved:
# https://github.com/ikalnytskyi/action-setup-postgres/issues/32
env:
PGPASSWORD: preflight_test_project_next_js_passing
run: node db.js
- run: pnpm migrate up
# Manually add back PGPASSWORD which has been cleared by ikalnytskyi/action-setup-postgres
#
# TODO: Remove when the issue is resolved:
# https://github.com/ikalnytskyi/action-setup-postgres/issues/32
env:
PGPASSWORD: preflight_test_project_next_js_passing
# Also generates next-env.d.ts, required for tsc
- name: Build Next.js app
run: pnpm build
# Manually add back PGPASSWORD which has been cleared by ikalnytskyi/action-setup-postgres
#
# TODO: Remove when the issue is resolved:
# https://github.com/ikalnytskyi/action-setup-postgres/issues/32
env:
PGPASSWORD: preflight_test_project_next_js_passing
- name: Run TypeScript Compiler
run: pnpm tsc
- name: Run ESLint
run: pnpm eslint . --max-warnings 0
# Manually add back PGPASSWORD which has been cleared by ikalnytskyi/action-setup-postgres
#
# TODO: Remove when the issue is resolved:
# https://github.com/ikalnytskyi/action-setup-postgres/issues/32
env:
PGPASSWORD: preflight_test_project_next_js_passing
- name: Run Stylelint
run: pnpm stylelint '**/*.{css,scss,less,js,tsx}'
- name: Install and run Preflight
run: |
pnpm add --global @upleveled/preflight
preflight