Skip to content

Commit

Permalink
CI: Create pull-request.yml
Browse files Browse the repository at this point in the history
Update scripts from package.json


CI: Skip install on cache hit

CI: Skip install on cache hit

CI: Skip install on cache hit

CI: Add sample on workflow

CI: Use builtin node action on workflow
  • Loading branch information
jorgebodega committed Oct 7, 2021
1 parent b97290c commit bd88d32
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 9 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pull request checks

on:
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- lts/erbium
- lts/fermium
name: Node ${{ matrix.node_version }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Format check
run: yarn format:ci
- name: Linter
run: yarn lint:ci
- name: Typecheck
run: yarn typecheck
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@
"url": "https://github.com/w3tecch/typeorm-seeding.git"
},
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc --project ./tsconfig.build.json",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "eslint \"src/**/*.ts\" --fix",
"build": "npm run prebuild && tsc --project ./tsconfig.build.json",
"watch": "rollup -cw",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"format:ci": "prettier --check \"src/**/*.ts\" \"sample/**/*.ts\"",
"lint": "eslint \"src/**/*.ts\" \"sample/**/*.ts\" --fix",
"lint:ci": "eslint \"src/**/*.ts\" \"sample/**/*.ts\"",
"prebuild": "rimraf dist",
"semantic-release": "semantic-release",
"schema:drop": "ts-node ./node_modules/typeorm/cli.js schema:drop -c sample",
"schema:sync": "ts-node ./node_modules/typeorm/cli.js schema:sync -c sample",
"schema:log": "ts-node ./node_modules/typeorm/cli.js schema:log -c sample",
"schema:sync": "ts-node ./node_modules/typeorm/cli.js schema:sync -c sample",
"seed:run": "ts-node ./dist/cli.js seed -c sample",
"seed:config": "ts-node ./dist/cli.js config -c sample"
"seed:config": "ts-node ./dist/cli.js config -c sample",
"test": "jest",
"test:cov": "jest --coverage",
"test:watch": "jest --watch",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@semantic-release/git": "^9.0.0",
Expand Down

0 comments on commit bd88d32

Please sign in to comment.