Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Pull request build

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
name: Lint and test project
permissions:
checks: write
contents: write
pull-requests: write
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install node 18
uses: actions/setup-node@v3
with:
node-version: '18'
cache: npm

- name: Install project modules
run: npm ci

- name: Lint source files
run: npm run lint

- name: Run unit tests and create coverage report
run: npm run tests:rep

- name: Run integration tests
working-directory: integration
run: bash ./run_it.sh

- name: Report test results
if: always()
uses: dorny/test-reporter@v1.6.0
with:
name: Unit Tests Run
path: unit-tests-result.json
reporter: mocha-json
35 changes: 35 additions & 0 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Stage

on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- ".github/**"
- "**.md"

jobs:
stage:
runs-on: ubuntu-latest
environment: staging
name: Stage the project
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install node 18
uses: actions/setup-node@v3
with:
node-version: '18'
cache: npm

- name: Install project modules
run: npm ci

- name: Lint source files
run: npm run lint

- name: Run unit tests and verify code coverage
run: npm test