Skip to content

Commit

Permalink
fix(ci): simplify CI steps, add npmignore
Browse files Browse the repository at this point in the history
  • Loading branch information
dziraf committed Mar 22, 2023
1 parent 590cf06 commit ac0f167
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 30 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,9 @@
name: CI/CD
on: push
jobs:
setup:
name: setup
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: actions/setup-node@v2
with:
node-version: 18
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install

test:
name: Test
runs-on: ubuntu-latest
needs: setup
# services:
# mongo:
# image: mongo
Expand All @@ -41,7 +15,7 @@ jobs:
- name: Setup
uses: actions/setup-node@v2
with:
node-version: 18
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
with:
Expand Down
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
\.idea/
node_modules/
spec/
test/
example-app/
src/
package-lock\.json
*.db
*.log
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"scripts": {
"dev": "rm -rf lib && tsc --watch",
"build": "rm -rf lib && tsc",
"clean": "rm -rf lib",
"build": "tsc",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --config ./test/jest.json --runInBand",
"cover": "jest --config ./test/jest.json --runInBand --coverage",
"lint": "eslint './test/**/*.ts' './src/**/*.ts'",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"moduleResolution": "nodenext",
"module": "nodenext",
"target": "esnext",
"sourceMap": true,
"sourceMap": false,
"outDir": "lib",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
Expand All @@ -12,7 +12,7 @@
"allowJs": true
},
"include": [
"./src"
"./src/**/*.ts"
],
"exclude": [
"node_modules",
Expand Down

0 comments on commit ac0f167

Please sign in to comment.