mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 09:33:10 -07:00
43 lines
915 B
YAML
43 lines
915 B
YAML
name: CI
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get Node.js version from .nvmrc
|
|
id: versions
|
|
shell: bash
|
|
run: |
|
|
NODE_VERSION=$(cat .nvmrc)
|
|
echo "node-version=$NODE_VERSION" >> $GITHUB_OUTPUT
|
|
echo "📦 Using Node.js $NODE_VERSION from .nvmrc"
|
|
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ steps.versions.outputs.node-version }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn
|
|
|
|
- name: Run checks (lint, type check, spell check)
|
|
run: yarn test
|
|
|
|
- name: Test build
|
|
run: yarn build
|