feat: node test runner (#208) #311
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-lint-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: | |
- 18 | |
- 20 | |
- 22 | |
os: | |
- ubuntu-latest | |
services: | |
postgres: | |
image: postgres:9-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: sqlmap | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s | |
--health-retries 5 | |
env: | |
PGPASS: postgres | |
PGUSER: postgres | |
PGDB: sqlmap | |
PGHOST: localhost | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install | |
run: npm install | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm test | |
- name: Test Security | |
run: npm run test:security | |
automerge: | |
needs: build-lint-test | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: fastify/github-action-merge-dependabot@v3 |