Skip to content

Update dependency @types/node to v25 #2848

Update dependency @types/node to v25

Update dependency @types/node to v25 #2848

Workflow file for this run

name: CI
on:
push:
branches:
- '**'
jobs:
build:
name: '${{ matrix.os }}: Build, lint, test'
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
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:
# Start preinstalled PostgreSQL database on Windows, macOS and Linux
# https://github.com/karlhorky/github-tricks/#github-actions-start-preinstalled-postgresql-database-on-windows-macos-and-linux
- name: Add PostgreSQL binaries to PATH
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
echo "$PGBIN" >> $GITHUB_PATH
elif [ "$RUNNER_OS" == "Linux" ]; then
echo "$(pg_config --bindir)" >> $GITHUB_PATH
fi
- name: Start preinstalled PostgreSQL
shell: bash
run: |
echo "Initializing database cluster..."
# Convert backslashes to forward slashes in RUNNER_TEMP for Windows Git Bash
export PGHOST="${RUNNER_TEMP//\\//}/postgres"
export PGDATA="$PGHOST/pgdata"
mkdir -p "$PGDATA"
# initdb requires file for password in non-interactive mode
export PWFILE="$RUNNER_TEMP/pwfile"
echo "postgres" > "$PWFILE"
initdb --pgdata="$PGDATA" --username="postgres" --pwfile="$PWFILE"
echo "Starting PostgreSQL..."
echo "unix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf"
pg_ctl start
echo "Creating user..."
psql --host "$PGHOST" --username="postgres" --dbname="postgres" --command="CREATE USER $PGUSERNAME PASSWORD '$PGPASSWORD'" --command="\du"
echo "Creating database..."
createdb --owner="$PGUSERNAME" --username="postgres" "$PGDATABASE"
# Avoid CRLF in Windows tests, which cause problems with Prettier:
# https://github.com/upleveled/preflight/runs/1824397400
#
# Suggested here: https://github.com/actions/checkout/issues/250#issuecomment-635267458
# Example repo: https://github.com/ghdl/ghdl/blob/aa63b5efcd2be66acc26443032df2b251e4b1a7a/.github/workflows/Test.yml#L230-L232
- name: Use LF instead of CRLF for clone
run: git config --global core.autocrlf input
- name: Checkout repo
uses: actions/checkout@v6
- run: corepack enable
# Set up PNPM_HOME directory to avoid errors such
# as `ERR_PNPM_NO_GLOBAL_BIN_DIR`:
#
# ```
#  ERR_PNPM_NO_GLOBAL_BIN_DIR  Unable to find the global bin directory
# Run "pnpm setup" to create it automatically, or set the global-bin-dir setting, or the PNPM_HOME env variable. The global bin directory should be in the PATH.
# ```
#
# - https://github.com/pnpm/pnpm/issues/9191#issuecomment-2687756396
- name: Set up pnpm global bin directory for `pnpm add --global`
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
PNPM_HOME=/c/Program\ Files/Git/home/runner/.local/share/pnpm
elif [ "$RUNNER_OS" == "Linux" ]; then
PNPM_HOME=/home/runner/.local/share/pnpm
fi
echo "PNPM_HOME=$PNPM_HOME" >> "$GITHUB_ENV"
echo "$PNPM_HOME" >> "$GITHUB_PATH"
shell: bash
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '24.11.1'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: pnpm install
if: runner.os != 'Windows'
working-directory: docker
- name: Lint
if: runner.os != 'Windows'
run: pnpm lint
- run: pnpm tsc --build
if: runner.os != 'Windows'
- name: Test
run: pnpm test