Skip to content

Commit ac99246

Browse files
author
Alan Churley
committed
Adding codeql
1 parent 3d92bad commit ac99246

File tree

3 files changed

+48
-21
lines changed

3 files changed

+48
-21
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '0 21 * * 0'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
# Override automatic language detection by changing the below list
20+
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
21+
language: ['javascript']
22+
# Learn more...
23+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v2
28+
29+
# Initializes the CodeQL tools for scanning.
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v1
32+
with:
33+
languages: ${{ matrix.language }}
34+
# If you wish to specify custom queries, you can do so here or in a config file.
35+
# By default, queries listed here will override any specified in a config file.
36+
# Prefix the list here with "+" to use these queries and those in the config file.
37+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v1

.github/workflows/pullRequest.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Test
22
on:
33
push:
44
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
57

68
jobs:
79
test:
@@ -14,3 +16,9 @@ jobs:
1416
run: npm run lint
1517
- name: Run tests
1618
run: npm run test
19+
- name: Report Coverage
20+
if: ${{ github.event_name == 'pull_request' }}
21+
uses: romeovs/[email protected]
22+
with:
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
24+
lcov-file: ./coverage/lcov.info

0 commit comments

Comments
 (0)