Skip to content

Commit

Permalink
fix: bring master changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
elribonazo committed Nov 13, 2023
2 parents e0d5a5c + 26dc305 commit d8d69df
Show file tree
Hide file tree
Showing 49 changed files with 4,397 additions and 765 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/*
/**/*.d.ts
/**/*.d.ts
integration-tests
17 changes: 7 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: Continuous integration

concurrency:
Expand All @@ -6,29 +7,24 @@ concurrency:
on:
pull_request:
branches:
- "master"

defaults:
run:
shell: bash
- master
push:
branches:
- master

jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
scope: "@input-output-hk"
registry-url: "https://npm.pkg.github.com"

- name: Install
run: npm install
Expand All @@ -47,6 +43,7 @@ jobs:
with:
audit_level: moderate
create_issues: false
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Jest Coverage Comment
uses: MishaKav/jest-coverage-comment@v1.0.23
Expand Down
60 changes: 38 additions & 22 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ on:
mediatorOobUrl:
required: true
description: Mediator out-of-band url
default: https://mediator.rootsid.cloud/oob_url
default: https://sit-prism-mediator.atalaprism.io/invitationOOB
prismAgentUrl:
required: true
description: Prism-agent server url
default: https://k8s-dev.atalaprism.io/prism-agent
default: https://sit-prism-agent-issuer.atalaprism.io/prism-agent
publishedDid:
required: false
description: Published DID
Expand All @@ -29,16 +29,9 @@ on:
pull_request:
branches:
- master

env:
GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
MEDIATOR_OOB_URL: ${{ inputs.mediatorOobUrl || vars.MEDIATOR_OOB_URL }}
PRISM_AGENT_URL: ${{ inputs.prismAgentUrl || vars.PRISM_AGENT_URL }}
PUBLISHED_DID: ${{ inputs.publishedDid || vars.PUBLISHED_DID }}
SCHEMA_ID: ${{ inputs.schemaId || vars.SCHEMA_ID }}
APIKEY: ${{ inputs.apiKey || secrets.APIKEY }}
NODE_AUTH_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
push:
branches:
- master

jobs:
run-e2e-tests:
Expand All @@ -47,43 +40,66 @@ jobs:

steps:
- name: Mask apikey
env:
APIKEY: ${{ inputs.apiKey || secrets.APIKEY }}
run: echo "::add-mask::${{env.APIKEY}}"

- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.ATALA_GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: Setup Node.js
- name: Setup Node.js for @input-output-hk
uses: actions/setup-node@v3
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
node-version: "lts/*"
registry-url: https://npm.pkg.github.com/
scope: "@input-output-hk"

- name: Setup Node.js for @hyperledger-labs
uses: actions/setup-node@v3
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
node-version: "lts/*"
registry-url: https://npm.pkg.github.com/
scope: "@hyperledger-labs"

- name: Pack atala-prism-wallet-sdk
if: github.event_name == 'pull_request'
run: |
npm install
npm run build
npm pack
echo "PACKAGE_NAME=$(find . -maxdepth 1 -name input-output* | tr -d '\n')" >> "$GITHUB_ENV"
echo "PACKAGE_NAME=$(find . -maxdepth 1 -name atala-prism-wallet-sdk-* | tr -d '\n')" >> "$GITHUB_ENV"
- name: Install local dependency
if: github.event_name == 'pull_request'
working-directory: integration-tests/e2e-tests
run: |
yarn
yarn add "../../${{ env.PACKAGE_NAME }}"
- name: Install dependencies
working-directory: integration-tests/e2e-tests
run: yarn

- name: Run tests
env:
MEDIATOR_OOB_URL: ${{ inputs.mediatorOobUrl || vars.MEDIATOR_OOB_URL }}
PRISM_AGENT_URL: ${{ inputs.prismAgentUrl || vars.PRISM_AGENT_URL }}
PUBLISHED_DID: ${{ inputs.publishedDid || vars.PUBLISHED_DID }}
SCHEMA_ID: ${{ inputs.schemaId || vars.SCHEMA_ID }}
APIKEY: ${{ inputs.apiKey || secrets.APIKEY }}
working-directory: integration-tests/e2e-tests
run: |
yarn
yarn test:sdk
yarn test:sdk:report
run: yarn test:sdk

- name: Generate end-to-end report
working-directory: integration-tests/e2e-tests
run: yarn test:sdk:report

- name: Add notes to summary
working-directory: integration-tests/e2e-tests
Expand All @@ -92,6 +108,6 @@ jobs:
- name: Publish Serenity report
uses: actions/upload-artifact@v3
with:
name: atala-prism-sdk-ts.zip
name: atala-prism-sdk-ts
path: integration-tests/e2e-tests/target/site/wallet-sdk-ts
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 2 additions & 7 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,15 @@ jobs:
docs:
name: build documentation and release
runs-on: ubuntu-latest
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: https://npm.pkg.github.com/
scope: "@input-output-hk"

- name: Install dependencies
run: npm install
Expand All @@ -46,4 +41,4 @@ jobs:
BRANCH: gh-pages # The branch name where you want to push the assets
FOLDER: docs # The directory where your assets are generated
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token
MESSAGE: "feat(docs): ({sha}) {msg}" # The commit message
MESSAGE: "feat(docs): ({sha}) {msg}" # The commit message
18 changes: 5 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,16 @@ on:

jobs:
release:
env:
GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
NODE_AUTH_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ATALA_GITHUB_TOKEN }}
fetch-depth: 0
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: https://npm.pkg.github.com/
scope: "@input-output-hk"
registry-url: 'https://registry.npmjs.org/'

- name: Install dependencies
run: npm install
Expand All @@ -41,6 +31,8 @@ jobs:

- name: Release
env:
NODE_AUTH_TOKEN: ${{ secrets.ATALA_NPM_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
GIT_AUTHOR_EMAIL: ${{ steps.import_gpg.outputs.email }}
GIT_COMMITTER_EMAIL: ${{ steps.import_gpg.outputs.email }}
GIT_AUTHOR_NAME: ${{ steps.import_gpg.outputs.name }}
Expand Down
100 changes: 48 additions & 52 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,51 @@
branches:
- 'master'
- "master"

plugins:
- '@semantic-release/commit-analyzer'
- '@semantic-release/release-notes-generator'
- [ '@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md'
}
]
- [ '@semantic-release/exec',
{
prepareCmd: 'npm version ${nextRelease.version} --git-tag-version false'
}
]
- [ '@semantic-release/exec',
{
prepareCmd: 'npm publish'
}
]
- [ '@semantic-release/exec',
{
prepareCmd: 'yarn --cwd integration-tests/e2e-tests add @input-output-hk/atala-prism-wallet-sdk@^${nextRelease.version}'
}
]
- [ '@semantic-release/git',
{
assets: [
'package.json',
'package-lock.json',
'CHANGELOG.md',
'integration-tests/e2e-tests/package.json',
'integration-tests/e2e-tests/yarn.lock'
],
message: 'chore(release): release ${nextRelease.version}
${nextRelease.notes}'
}
]
- [ "semantic-release-slack-bot",
{
notifyOnSuccess: true,
notifyOnFail: true,
markdownReleaseNotes: true,
onSuccessTemplate: {
text: "A new version of `$package_name` successfully released!\n
Version: `$npm_package_version`\n
Tag: $repo_url/releases/tag/v$npm_package_version\n
\n
Release notes:\n
$release_notes"
}
}
]
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- ["@semantic-release/changelog", { changelogFile: "CHANGELOG.md" }]
- [
"@semantic-release/exec",
{
prepareCmd: "npm version ${nextRelease.version} --git-tag-version false",
},
]
- ["@semantic-release/exec", { prepareCmd: "npm publish --access public" }]
- [
"@semantic-release/exec",
{
prepareCmd: "yarn --cwd integration-tests/e2e-tests add @atala/prism-wallet-sdk@^${nextRelease.version}",
},
]
- [
"@semantic-release/git",
{
assets:
[
"package.json",
"package-lock.json",
"CHANGELOG.md",
"integration-tests/e2e-tests/package.json",
"integration-tests/e2e-tests/yarn.lock",
],
message: "chore(release): release ${nextRelease.version}
${nextRelease.notes}",
},
]
- [
"semantic-release-slack-bot",
{
notifyOnSuccess: true,
notifyOnFail: true,
markdownReleaseNotes: true,
onSuccessTemplate:
{ text: "A new version of `$package_name` successfully released!\n
Version: `$npm_package_version`\n
Tag: $repo_url/releases/tag/v$npm_package_version\n
\n
Release notes:\n
$release_notes" },
},
]
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# [3.1.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v3.0.0...v3.1.0) (2023-11-13)


### Bug Fixes

* CI pipeline issues. ([#121](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/121)) ([28b5a8f](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/28b5a8f4492f4972ff4848e8a2d35f333872bfeb))


### Features

* extending Agent.acceptInvitation to handle OOB + Prism ([#111](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/111)) ([ce8326b](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/ce8326b0cf9c0b9090b4e5df88f6e37601bbcc95))

# [3.0.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v2.5.0...v3.0.0) (2023-11-07)


* docs!: Introduced breaking changes in Pluto as we are intro… (#116) ([be8c6e8](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/be8c6e835debed7b867afe30a5c66e6d196fd716)), closes [#116](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/116)


### Features

* **Agent:** add initialize function ([#107](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/issues/107)) ([14389a1](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/commit/14389a169b3580b1ff334a9130bf0776807ba0a2))


### BREAKING CHANGES

* Introduced breaking changes in Pluto as we are introducing credential abstraction and anoncred issuing functionality.
- X25519 keys were wrongly set as EC (elliptic) key types which is wrong. EC25519 + Secp256k1 belong to EC key type, X25519 should have Curve25519 instead to be valid. If you previously had a key stored as EC (x25519) changing that keyType to KeyTypes.X25519 (Curve25519).
- As we have introduced new credential types we have also built a credential abstraction so storing and fetching credentials becomes easier.

# [2.5.0](https://github.com/input-output-hk/atala-prism-wallet-sdk-ts/compare/v2.4.1...v2.5.0) (2023-10-31)


Expand Down
Loading

0 comments on commit d8d69df

Please sign in to comment.