Skip to content

ci: add self-hosted CI workflow #1

ci: add self-hosted CI workflow

ci: add self-hosted CI workflow #1

name: Self-Hosted CI
on:
push:
branches: [master, main, develop]
pull_request:
branches: [master, main, develop]
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: [self-hosted]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
clean: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
env:
CI: true
- name: Run lint
run: npm run lint
test:
name: Test
runs-on: [self-hosted]
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
clean: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
env:
CI: true
- name: Run tests
run: npm test
env:
CI: true