Skip to content

Commit

Permalink
Feature/send invitation (#38)
Browse files Browse the repository at this point in the history
Adds new connection establishment, sending emails and and oob invitation
  • Loading branch information
mattdean-digicatapult authored May 31, 2024
1 parent 4bf4721 commit e9840db
Show file tree
Hide file tree
Showing 34 changed files with 1,673 additions and 758 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: Release

on:
push:
branches: ["main"]
branches: ['main']

jobs:

preconditions:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -33,6 +32,7 @@ jobs:
static-checks:
name: Run Static Analysis Checks
strategy:
fail-fast: false
matrix:
command: [lint, depcheck, xss-scan, check]
runs-on: ubuntu-latest
Expand All @@ -56,6 +56,10 @@ jobs:

tests:
name: Run tests
strategy:
fail-fast: false
matrix:
command: ['test:unit', 'test:integration']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -72,6 +76,8 @@ jobs:
${{ runner.OS }}-
- name: Install Packages
run: npm ci
- name: Build tsoa
run: npm run tsoa:build
- name: Setup dependencies
run: docker compose up -d
- name: Sleep
Expand All @@ -83,10 +89,10 @@ jobs:
env:
NODE_ENV: test
- name: Run tests
run: npm run test
run: npm run ${{ matrix.command }}

check-version:
name: "Check version"
name: 'Check version'
runs-on: ubuntu-latest
outputs:
is_new_version: ${{ steps.get_version.outputs.IS_NEW_VERSION }}
Expand All @@ -103,7 +109,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

publish:
name: "Publish package"
name: 'Publish package'
needs: [preconditions, static-checks, tests, check-version]
runs-on: ubuntu-latest
if: ${{ needs.check-version.outputs.is_new_version == 'true' }}
Expand All @@ -120,7 +126,7 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: "--debug"
buildkitd-flags: '--debug'
- name: Generate tags
id: generate-tags
env:
Expand Down Expand Up @@ -184,16 +190,16 @@ jobs:
# Build github release
- name: Build release version
uses: "marvinpinto/action-automatic-releases@latest"
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: ${{ needs.check-version.outputs.version }}
prerelease: false
title: Release ${{ needs.check-version.outputs.version }}
- name: Build release latest
uses: "marvinpinto/action-automatic-releases@latest"
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: latest
prerelease: false
title: Latest Release ${{ needs.check-version.outputs.version }}
18 changes: 12 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: Lint and Test

on:
push:
branches-ignore: ["main"]
branches-ignore: ['main']

jobs:

repo_ids:
runs-on: ubuntu-latest
outputs:
Expand All @@ -27,6 +26,7 @@ jobs:
static-checks:
name: Run Static Analysis Checks
strategy:
fail-fast: false
matrix:
command: [lint, depcheck, xss-scan, check]
runs-on: ubuntu-latest
Expand All @@ -50,6 +50,10 @@ jobs:

tests:
name: Run tests
strategy:
fail-fast: false
matrix:
command: ['test:unit', 'test:integration']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -66,6 +70,8 @@ jobs:
${{ runner.OS }}-
- name: Install Packages
run: npm ci
- name: Build tsoa
run: npm run tsoa:build
- name: Setup dependencies
run: docker compose up -d
- name: Sleep
Expand All @@ -77,10 +83,10 @@ jobs:
env:
NODE_ENV: test
- name: Run tests
run: npm run test
run: npm run ${{ matrix.command }}

check-version:
name: "Check version"
name: 'Check version'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -91,7 +97,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

build-docker:
name: "Build docker image"
name: 'Build docker image'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -103,7 +109,7 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: "--debug"
buildkitd-flags: '--debug'
- name: Build image
uses: docker/build-push-action@v5
with:
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ npm run db:cmd -- seed:make "<name_of_seed_file>"

## Tests

Tests can be run with
Unit tests can be run with

```bash
npm run test
npm run test:unit
```

Integration tests can be run with

```bash
npm run test:integration
```
38 changes: 38 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,44 @@ services:
volumes:
- ./docker/keycloak:/opt/keycloak/data/import
command: start-dev --import-realm
ipfs:
container_name: ipfs
image: ipfs/kubo:release
volumes:
- ipfs:/data/ipfs
postgres:
container_name: postgres-veritable-cloudagent
image: postgres:16.3-alpine
restart: on-failure
volumes:
- postgres-veritable-cloudagent:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres-veritable-cloudagent
veritable-cloudagent:
image: digicatapult/veritable-cloudagent
container_name: veritable-cloudagent
restart: always
depends_on:
ipfs:
condition: service_healthy
ports:
- 3001:3000
environment:
- AFJ_REST_ENDPOINT=ws://veritable-cloudagent:5003
- AFJ_REST_ADMIN_PORT=3000
- AFJ_REST_INBOUND_TRANSPORTS="ws 5003"
- AFJ_REST_IPFS_ORIGIN=http://ipfs:5001
- AFJ_REST_POSTGRES_HOST=postgres
- AFJ_REST_POSTGRES_PORT=5432
- AFJ_REST_POSTGRES_USERNAME=postgres
- AFJ_REST_POSTGRES_PASSWORD=postgres
- AFJ_REST_LABEL=vertiable-cloudagent
- AFJ_REST_WALLET_ID=walletId
- AFJ_REST_WALLET_KEY=walletKey

volumes:
ipfs:
postgres-veritable-ui:
postgres-veritable-cloudagent:
Loading

0 comments on commit e9840db

Please sign in to comment.