Skip to content

Commit

Permalink
Add Test Workflow (Papooch#14)
Browse files Browse the repository at this point in the history
* cicd: add test workflow

* cicd: change in action

* chore: add .github to npmignore
  • Loading branch information
Papooch authored Jan 15, 2022
1 parent 786bcf8 commit 3cdbed6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/run-tests.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run tests

on:
workflow_dispatch:
pull_request:
branches:
- main

concurrency:
cancel-in-progress: true
group: test-${{ github.ref }}

jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.x
cache: npm
- run: npm ci --audit=false
- run: npm run lint
- run: npm run test
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
.github
node_modules
tmp
test
Expand Down
16 changes: 12 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 4
}
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 4,
"overrides": [
{
"files": ["*.yaml", "*.yml"],
"options": {
"tabWidth": 2
}
}
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage"
Expand Down

0 comments on commit 3cdbed6

Please sign in to comment.