Refresh onfido-node after onfido-openapi-spec update (40e7a67) #7
Workflow file for this run
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: Node CI with NPM | |
on: | |
push: | |
branches: | |
- master | |
- "release/**" | |
pull_request: | |
branches: | |
- master | |
- "release/**" | |
workflow_dispatch: | |
release: | |
types: | |
- published | |
jobs: | |
integration-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x, 21.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linter over tests | |
run: npx prettier -c test/**/*.ts | |
- name: Run integration tests with NPM | |
if: ${{ matrix.node-version == '16.x' && | |
github.repository_owner == 'onfido' && | |
github.actor != 'dependabot[bot]' }} | |
run: npm test -- -i | |
env: | |
ONFIDO_API_TOKEN: ${{ secrets.ONFIDO_API_TOKEN }} | |
ONFIDO_SAMPLE_APPLICANT_ID: ${{ secrets.ONFIDO_SAMPLE_APPLICANT_ID }} | |
ONFIDO_SAMPLE_VIDEO_ID_1: ${{ secrets.ONFIDO_SAMPLE_VIDEO_ID_1 }} | |
ONFIDO_SAMPLE_VIDEO_ID_2: ${{ secrets.ONFIDO_SAMPLE_VIDEO_ID_2 }} | |
ONFIDO_SAMPLE_MOTION_ID_1: ${{ secrets.ONFIDO_SAMPLE_MOTION_ID_1 }} | |
ONFIDO_SAMPLE_MOTION_ID_2: ${{ secrets.ONFIDO_SAMPLE_MOTION_ID_2 }} | |
publish-npm: | |
runs-on: ubuntu-latest | |
needs: integration-tests | |
if: github.event_name == 'release' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: npm ci | |
- name: Build and publish package | |
run: | | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} |