This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user