Skip to content

Commit

Permalink
Update tests after new library generation (incl. gitactions updates)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido committed Mar 11, 2024
1 parent c4a236c commit 1f066a2
Show file tree
Hide file tree
Showing 42 changed files with 3,912 additions and 4,866 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 15.x, 16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -31,18 +31,17 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- name: Mock testing
run: npm test
# - name: E2E testing
# if: ${{ matrix.node-version == '14.x' &&
# github.event.pull_request.head.repo.full_name == github.repository &&
# 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}}
# NOCK_OFF: true
- name: Run linter over tests
run: npx prettier -c test/**/*.ts
- name: E2E testing
if: ${{ matrix.node-version == '16.x' &&
github.event.pull_request.head.repo.full_name == github.repository &&
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 }}
21 changes: 9 additions & 12 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@ jobs:
with:
node-version: 14
- run: npm ci
- name: Mock testing
run: npm test
# - name: E2E testing
# 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}}
# NOCK_OFF: true
- name: E2E testing
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:
needs: build
Expand Down
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## v3.0.0 11th March 2024
## v3.0.0 12th March 2024

- Automatically generate library from [Onfido OpenAPI spec](https://github.com/onfido/onfido-openapi-spec/tree/master)

## v2.9.0 24 November 2023

Expand Down Expand Up @@ -36,7 +38,7 @@

## v2.3.1, 24 May 2022

- Reinstated `privacyNoticesReadConsentGiven` parameter
- Reinstated `privacyNoticesReadConsentGiven` parameter

## v2.3.0, 10 May 2022

Expand All @@ -63,12 +65,12 @@

## v2.0.2, 25 May 2021

- Added `environments` to Webhook object
- Added `environments` to Webhook object

## v2.0.1, 17 May 2021

- Added `sub_result` to trigger sandbox pre-determined responses for Document report sub-results
- Added `consider` array functionality for sandbox pre-determined responses
- Added `consider` array functionality for sandbox pre-determined responses

## v2.0.0, 9 April 2021

Expand Down
Loading

0 comments on commit 1f066a2

Please sign in to comment.