Skip to content

Functional tests

Functional tests #1174

name: Functional tests
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 5 * * *'
jobs:
set_datadog_team:
name: 'Set Datadog team'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/set-datadog-team.yml@v1
secrets:
DD_API_KEY: ${{ secrets.INTEGRATIONS_DATADOG_API_KEY }}
build:
name: 'Build sdk'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/build-typescript-project.yml@v1
with:
artifactName: node-sdk-artifact
artifactPath: ./dist
functional_tests:
name: 'Smoke test on node ${{ matrix.node-version }}'
needs: build
runs-on: ubuntu-latest
strategy:
max-parallel: 3
fail-fast: false
matrix:
node-version: [18, 19, 20, 21, 22, 23]
steps:
- if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@v4
- name: 'Install pnpm'
uses: pnpm/action-setup@129abb77bf5884e578fcaf1f37628e41622cc371
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: actions/download-artifact@v4
with:
name: node-sdk-artifact
path: ./dist
- name: Install Dependencies for SDK
run: pnpm install
env:
CI: true
- name: Install Dependencies for example
run: pnpm install
working-directory: ./example
env:
CI: true
- name: Run test
run: |
node smokeTests.mjs
working-directory: ./tests/functional-tests
env:
API_KEY: '${{ secrets.PRIVATE_KEY }}'