Skip to content

Commit

Permalink
add pipeline for scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
SmnHgr committed Feb 9, 2024
1 parent d661b18 commit ef2d3a8
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/scanner-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Scanner Build
on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Cache node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci --prefer-offline

- name: Build
run: npm run build
env:
CI: true
27 changes: 27 additions & 0 deletions .github/workflows/scanner-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Scanner Lint

on:
push:
pull_request:

jobs:

lint:
runs-on: ubuntu-latest
needs: build
uses: ./.github/workflows/scanner-build.yml
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies
run: npm ci --prefer-offline

- name: Lint
run: npm run test:lint

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

on:
push:
pull_request:

jobs:
type-check:
runs-on: ubuntu-latest
needs: build
uses: ./.github/workflows/scanner-build.yml
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies
run: npm ci --prefer-offline

- name: Type check
run: npm run test:typecheck
30 changes: 30 additions & 0 deletions .github/workflows/scanner-unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Scanner Unit Tests

on:
push:
pull_request:

jobs:
unit-test:
runs-on: ubuntu-latest
needs: build
uses: ./.github/workflows/scanner-build.yml
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: npm ci --prefer-offline

- name: Unit test
run: npm run test:unittest
- name: Upload coverage report
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: coverage/cobertura-coverage.xml

0 comments on commit ef2d3a8

Please sign in to comment.