Skip to content

Commit

Permalink
Use npm test for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lauriro committed Oct 28, 2022
1 parent 1ed4325 commit 6235767
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 94 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/Test.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CodeQL

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: "29 1 2 * *"

jobs:
Analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:javascript"

23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
Coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm install -g c8 jshint uglify-js
- run: npm install
- run: npm test
- uses: coverallsapp/github-action@master
name: Upload to coveralls.io
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"*.js",
"cli"
],
"scripts": {
"test": "TZ='Europe/Tallinn' c8 -r lcov -r text-summary node -r ./test.js --allow-natives-syntax --expose-gc test/index.js --brief"
},
"bin": {
"lj-doc": "./cli/doc",
"lj-stat": "./cli/stat",
Expand Down

0 comments on commit 6235767

Please sign in to comment.