Skip to content

Commit 226977f

Browse files
committed
Add integration tests
This change wires up integration tests and adds steps for running integration tests to CI. The general approach is to use a separate package in `./integration-tests` that installs `@cipherstash/protect-ffi` as a local dependency. This keeps our TS config simple and allows us to test against the build output (including types) instead of only source files. There's currently only a single test, but the intent is to add more after we have the basic plumbing in place.
1 parent 56cc9ea commit 226977f

File tree

6 files changed

+1490
-7
lines changed

6 files changed

+1490
-7
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
update-version: true
5050
github-release: false
5151

52-
unit-tests:
53-
name: Unit Tests
52+
tests:
53+
name: Tests
5454
runs-on: ubuntu-latest
5555
steps:
5656
- name: Checkout Code
@@ -62,10 +62,18 @@ jobs:
6262
platform: linux-x64-gnu
6363
- name: Build
6464
shell: bash
65-
env:
66-
CARGO_BUILD_TARGET: ${{ steps.neon.outputs.target }}
67-
NEON_BUILD_PLATFORM: linux-x64-gnu
6865
run: npm run debug
69-
- name: Test
66+
- name: Test (unit)
7067
shell: bash
7168
run: npm test
69+
- name: Install integration test dependencies
70+
run: npm ci
71+
working-directory: ./integration-tests
72+
- name: Test (integration)
73+
env:
74+
CS_WORKSPACE_ID: ${{ secrets.CS_WORKSPACE_ID }}
75+
CS_CLIENT_ACCESS_KEY: ${{ secrets.CS_CLIENT_ACCESS_KEY }}
76+
CS_CLIENT_ID: ${{ secrets.CS_CLIENT_ID }}
77+
CS_CLIENT_KEY: ${{ secrets.CS_CLIENT_KEY }}
78+
run: npm test
79+
working-directory: ./integration-tests

0 commit comments

Comments
 (0)