diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 376a02e6..662cb3e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/README.md b/README.md index 22635f96..0ca1bf72 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/docker-compose.yaml b/docker-compose.yaml index 20a7defb..1fb5e6ab 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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