Skip to content

Commit

Permalink
fix and simplify build
Browse files Browse the repository at this point in the history
  • Loading branch information
morris committed Jul 1, 2024
1 parent dbe7e4d commit 63a8280
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
name: Pipeline

on:
push:
branches:
- main
on: push

jobs:
build:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run lint
if: ${{ matrix.node-version != '14.x' }}
Expand All @@ -37,8 +33,19 @@ jobs:
env:
CI: true
- run: npx codecov
if: ${{ matrix.node-version == '18.x' }}
- run: npm run maybe-publish
if: ${{ github.ref == 'refs/heads/main' && matrix.node-version == '14.x' }}
if: ${{ github.ref == 'refs/heads/main' && matrix.node-version == '18.x' }}
publish:
if: github.ref == 'refs/heads/main'
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14.x
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm publish || echo "Already published"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion examples/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"noUnusedLocals": true,
"strict": true,
"strictFunctionTypes": true,
"strictNullChecks": true
"strictNullChecks": true,
"skipLibCheck": true
}
}
3 changes: 2 additions & 1 deletion examples/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"noUnusedLocals": true,
"strict": true,
"strictFunctionTypes": true,
"strictNullChecks": true
"strictNullChecks": true,
"skipLibCheck": true
}
}
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,15 @@
"scripts": {
"build": "bash scripts/build.sh",
"build-examples": "bash scripts/build-examples.sh",
"check": "bash scripts/check.sh",
"clean": "bash scripts/clean.sh",
"docs": "typedoc src/index.ts --excludeProtected --excludePrivate --readme none --out docs/reference",
"example": "bash scripts/example.sh",
"format": "prettier --write .",
"format-check": "prettier --check .",
"lint": "eslint .",
"maybe-publish": "bash scripts/maybe-publish.sh",
"pipeline": "bash scripts/pipeline.sh",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"test-coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
"docs": "typedoc src/index.ts --excludeProtected --excludePrivate --readme none --out docs/reference"
"test-coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage"
},
"peerDependencies": {
"graphql": "^16",
Expand Down
2 changes: 1 addition & 1 deletion scripts/pipeline.sh → scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ npm run lint
npm run format-check
npm run build
npm run build-examples
npm test
npm run test-coverage
9 changes: 0 additions & 9 deletions scripts/maybe-publish.sh

This file was deleted.

0 comments on commit 63a8280

Please sign in to comment.