Files
type-from-json/.gitea/workflows/ci.yml
7000pctAUTO 1a9ba57491
Some checks failed
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
fix: resolve CI lint and Jest config warnings
2026-01-31 12:34:09 +00:00

65 lines
1.3 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: type-from-json/package-lock.json
- name: Install dependencies
run: |
cd type-from-json
npm ci
- name: Run linting
run: |
cd type-from-json
npm run lint
- name: Run tests
run: |
cd type-from-json
npm test
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: type-from-json/package-lock.json
- name: Install dependencies
run: |
cd type-from-json
npm ci
- name: Build project
run: |
cd type-from-json
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: type-from-json/dist/