do not save token Id, if value is null #234
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Test Suite | |
on: | |
push: | |
branches: [master] | |
pull_request: # run on all pull requests | |
jobs: | |
lintjs: | |
name: Javascript standard lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm ci --legacy-peer-deps | |
- run: npm run lint | |
unittest: | |
name: unit tests | |
runs-on: ubuntu-latest | |
needs: [lintjs] | |
strategy: | |
matrix: | |
node: [16, 18, 20] | |
steps: | |
- name: Checkout ${{ matrix.node }} | |
uses: actions/checkout@v3 | |
- name: Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache dependencies ${{ matrix.node }} | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ matrix.node }} | |
- run: npm ci --legacy-peer-deps | |
- run: npm run test:coverage | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: [unittest] | |
strategy: | |
matrix: | |
node: [16, 18, 20] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm run build --if-present |