Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add integration test matrix for keria version #245

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,29 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test:
name: Run integration test
runs-on: ubuntu-latest
name: Run integration test using keria:${{ matrix.keria-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
keria-version: ['latest', '0.1.2', '0.1.3']
node-version: ['20']
env:
KERIA_IMAGE_TAG: ${{ matrix.keria-version }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: install deps
run: npm ci
- name: Build
run: npm run build
- name: Print docker compose config
run: docker compose config
- name: Start dependencies
run: docker compose up deps --pull always
- name: Run integration test
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ signify-ts-deps-1 | Dependencies running
signify-ts-deps-1 exited with code 0
```

It is possible to change the keria image by using environment variables. For example, to use weboftrust/keria:0.1.3, do:

```bash
export KERIA_IMAGE_TAG=0.1.3
docker compose pull
docker compose up deps
```

To use another repository, you can do:

```bash
export KERIA_IMAGE=gleif/keria
docker compose pull
docker compose up deps
```

**Important!** The integration tests runs on the build output in `dist/` directory. Make sure to run build before running the integration tests.

```bash
Expand All @@ -101,14 +117,6 @@ TEST_ENVIRONMENT=local npx jest examples/integration-scripts/credentials.test.ts

This changes the discovery urls to use `localhost` instead of the hostnames inside the docker network.

### Old integration scripts

To run any of the old integration scripts that has not yet been converted to an integration test. Use `ts-node-esm`

```bash
npx ts-node-esm examples/integration-scripts/challenge.ts
```

# Diagrams

Account Creation Workflow
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- 7723:7723

keria:
image: weboftrust/keria:latest
image: ${KERIA_IMAGE:-weboftrust/keria}:${KERIA_IMAGE_TAG:-latest}
environment:
- KERI_AGENT_CORS=1
- KERI_URL=http://keria:3902
Expand Down
Loading