Skip to content

Commit

Permalink
Add github action for linting and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tmrdlt committed Jan 16, 2024
1 parent e45e6be commit f388c0b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Unit testing

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize

jobs:
test:
name: Lint & Test
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: npm install

- name: Lint
run: npm run lint

- name: Test
run: npm run test -- --configuration=ci

- name: Test sample app
run: npm run test-sample-app -- --configuration=ci
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
"ng": "ng",
"start": "ng serve --open",
"build": "ng build NGX-TAG-COMMANDER",
"test": "ng test NGX-TAG-COMMANDER",
"test-sample-app": "ng test",
"test-wrapper": "ng test NGX-TAG-COMMANDER",
"lint": "ng lint",
"e2e": "ng e2e"
"lint": "ng lint"
},
"private": true,
"dependencies": {
Expand Down

0 comments on commit f388c0b

Please sign in to comment.