Skip to content

Commit

Permalink
Merge pull request #261 from getyoti/release/3.15.0
Browse files Browse the repository at this point in the history
Release 3.15.0
  • Loading branch information
laurent-yoti authored Jan 28, 2021
2 parents 03babf5 + b534500 commit 0807f0e
Show file tree
Hide file tree
Showing 22 changed files with 2,149 additions and 23 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Tests
on: [push, pull_request_target]

jobs:
tests:
name: Unit Tests
runs-on: ubuntu-latest
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting for sonarcloud
fetch-depth: 0

- uses: actions/[email protected]

- run: npm install

- run: npm update

- run: npm audit --production

- run: set -o pipefail && npm audit --audit-level=high --parseable | awk -F $'\t' 'NF {print $2,"("$3") - "$4" - "$5" - "$6}' | awk '!visited[$0]++'

- run: npm test

- name: Fix code coverage paths
run: sed -i 's/\/home\/runner\/work\/yoti-node-sdk\/yoti-node-sdk\//\/github\/workspace\//g' ./coverage/lcov.info

- uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

examples:
name: Lint Examples
runs-on: ubuntu-latest
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]

- run: npm install

- run: npm update

- run: pushd ./examples/aml-check && npm install && npm update && npm run lint && popd

- run: pushd ./examples/profile && npm install && npm update && npm run lint && popd

- run: pushd ./examples/doc-scan && npm install && npm update && npm run lint && popd

node-compatibility:
name: Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
# always run on push events
# only run on pull_request_target event when pull request pulls from fork repository
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
node-version: [6, 8, 9, 10, 11, 12, 13, 14]

steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}

- run: npm install

- run: npm update

- run: npm run unit-test

os-compatibility:
name: Running in ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# always run on push events
# only run on pull_request_target event when pull request pulls from fork repository
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]

- run: npm install

- run: npm update

- run: npm run unit-test
1 change: 1 addition & 0 deletions examples/aml-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"eslint": "4.18.1",
"eslint-config-airbnb-base": "12.1.0",
"eslint-plugin-import": "2.9.0",
"eslint-plugin-jest": "24.1.3",
"eslint-plugin-node": "6.0.1"
}
}
1 change: 0 additions & 1 deletion examples/doc-scan/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.env
/keys
package-lock.json
Loading

0 comments on commit 0807f0e

Please sign in to comment.