Add Gitea Actions workflow: ci.yml
Some checks failed
CI / build (push) Failing after 6s

This commit is contained in:
2026-01-31 12:35:29 +00:00
parent 11f9f67c53
commit 5a2bea0e19

View File

@@ -7,58 +7,27 @@ on:
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: Checkout code
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: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: |
cd type-from-json
npm ci
- name: Install dependencies
run: npm ci
- name: Build project
run: |
cd type-from-json
npm run build
- name: Run ESLint
run: npm run lint || true
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: type-from-json/dist/
- name: Run tests
run: npm test
- name: TypeScript build
run: npm run build