Skip to content

Commit

Permalink
chore(ci): update pnpm, remove goerli, fix tests (#1391)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceanis authored Jun 10, 2024
1 parent 4f7f569 commit 6029625
Show file tree
Hide file tree
Showing 22 changed files with 16,092 additions and 22,712 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build-and-test-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fetch-depth: 0
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand All @@ -22,8 +22,8 @@ jobs:
- name: 'Save build output'
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'

test-integration:
needs: build
Expand All @@ -43,14 +43,14 @@ jobs:
steps:
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'
restore-keys: '${{ runner.os }}-build-${{ github.sha }}'
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand Down Expand Up @@ -95,14 +95,14 @@ jobs:
steps:
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'
restore-keys: '${{ runner.os }}-build-${{ github.sha }}'
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand All @@ -120,14 +120,14 @@ jobs:
steps:
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'
restore-keys: '${{ runner.os }}-build-${{ github.sha }}'
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/build-test-publish-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
persist-credentials: false
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand All @@ -30,8 +30,8 @@ jobs:
- name: 'Save build output'
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'

test-integration:
needs: build
Expand All @@ -51,14 +51,14 @@ jobs:
steps:
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'
restore-keys: '${{ runner.os }}-build-${{ github.sha }}'
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand Down Expand Up @@ -104,14 +104,14 @@ jobs:
steps:
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'
restore-keys: '${{ runner.os }}-build-${{ github.sha }}'
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand All @@ -129,14 +129,14 @@ jobs:
steps:
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'
restore-keys: '${{ runner.os }}-build-${{ github.sha }}'
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
token: ${{secrets.GH_TOKEN}}
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- run: pnpm add -g pnpm
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
Expand All @@ -178,9 +178,9 @@ jobs:
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
path: '${{ github.workspace }}'
key: '${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}'
restore-keys: '${{ runner.os }}-build-${{ github.sha }}'
fail-on-cache-miss: true

- name: 'Setup git coordinates'
Expand Down
6 changes: 3 additions & 3 deletions __tests__/initial.migration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ describe('database initial migration tests', () => {
defaultProvider: 'did:key',
providers: {
// intentionally using deprecated config for backward compatibility checks
'did:ethr:goerli': new EthrDIDProvider({
'did:ethr:sepolia': new EthrDIDProvider({
defaultKms: 'local',
network: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
network: 'sepolia',
rpcUrl: 'https://sepolia.infura.io/v3/' + infuraProjectId,
}),
'did:web': new WebDIDProvider({
defaultKms: 'local',
Expand Down
5 changes: 0 additions & 5 deletions __tests__/localAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,6 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
chainId: 1,
rpcUrl: 'https://mainnet.infura.io/v3/' + infuraProjectId,
},
{
name: 'goerli',
chainId: 5,
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
},
{
name: 'sepolia',
chainId: 11155111,
Expand Down
4 changes: 0 additions & 4 deletions __tests__/localJsonStoreAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
name: 'mainnet',
rpcUrl: 'https://mainnet.infura.io/v3/' + infuraProjectId,
},
{
name: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
},
{
name: 'sepolia',
chainId: 11155111,
Expand Down
4 changes: 0 additions & 4 deletions __tests__/localMemoryStoreAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
name: 'mainnet',
rpcUrl: 'https://mainnet.infura.io/v3/' + infuraProjectId,
},
{
name: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
},
{
name: 'sepolia',
chainId: 11155111,
Expand Down
4 changes: 0 additions & 4 deletions __tests__/restAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ const setup = async (options?: IAgentOptions): Promise<boolean> => {
name: 'mainnet',
rpcUrl: 'https://mainnet.infura.io/v3/' + infuraProjectId,
},
{
name: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/' + infuraProjectId,
},
{
name: 'sepolia',
chainId: 11155111,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/shared/didManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export default (testContext: {
})
expect(ethrIdentifiers.length).toBeGreaterThanOrEqual(1)

// Default provider 'did:ethr:goerli'
// Default provider 'did:ethr:sepolia'
await agent.didManagerCreate({ provider: 'did:ethr' })

const ethrIdentifiers2 = await agent.didManagerFind({
Expand Down
4 changes: 2 additions & 2 deletions __tests__/shared/documentationExamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default (testContext: {
it('core-types-IDIDManager-didManagerCreate example', async () => {
const identifier = await agent.didManagerCreate({
alias: 'charlie',
provider: 'did:ethr:goerli',
provider: 'did:ethr:sepolia',
kms: 'local',
})
})
Expand All @@ -87,7 +87,7 @@ export default (testContext: {
alias: 'alice',
})

const goerliIdentifiers = await agent.didManagerFind({
const sepoliaIdentifiers = await agent.didManagerFind({
provider: 'did:ethr:goerli',
})
})
Expand Down
2 changes: 1 addition & 1 deletion __tests__/shared/messageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default (testContext: {

it('should parse raw message', async () => {
const raw =
'eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vdmVyYW1vLmlvL2NvbnRleHRzL3Byb2ZpbGUvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJ5b3UiOiJSb2NrIn19LCJzdWIiOiJkaWQ6d2ViOmV4YW1wbGUuY29tIiwibmJmIjoxNjY1NDQ2NTgxLCJpc3MiOiJkaWQ6ZXRocjpnb2VybGk6MHgwMmExNDYzZDIyMDVjN2NkN2ZiMjkzY2RlNGQ5ZTM2YWRjYTk5MGY3ZWZhOTBiOTVlNTRmNTBkZjBhMTZjMTc0MjIifQ.cOUOSic-8YGQfUGPmHjj5HDS09LXGj9nEe6UOsbYRbl-VZMoLBNHcFgp2B-ZWNhe202B-pbCK51xM3viO3OfZA'
'eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7Im5hbWUiOiJBbGljZSJ9fSwic3ViIjoiZGlkOmtleTp6Nk1rakRVR29STDFTVVdGWVkzRmF6SkZYd1JpeVZQeHNwS3NraTlCSlZzRFpIQmkiLCJuYmYiOjE3MTc3NDY3MzUsImlzcyI6ImRpZDprZXk6ejZNa2pEVUdvUkwxU1VXRllZM0ZhekpGWHdSaXlWUHhzcEtza2k5QkpWc0RaSEJpIn0.USuGnZCTwqDUXRaPBlQN_c8LZxl03zf8TkEqP6xC4I6I-ruj5NNbQ_bYhOCUTi9LER_FO5zDU8V0MmaPCxnNBA'
parsedMessage = await agent.handleMessage({
raw,
save: false,
Expand Down
6 changes: 3 additions & 3 deletions __tests__/shared/verifiableDataJWT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ export default (testContext: {

describe('using testvectors', () => {
const importedDID = {
did: 'did:ethr:goerli:0x03155ee0cbefeecd80de63a62b4ed8f0f97ac22a58f76a265903b9acab79bf018c',
provider: 'did:ethr:goerli',
did: 'did:ethr:sepolia:0x03155ee0cbefeecd80de63a62b4ed8f0f97ac22a58f76a265903b9acab79bf018c',
provider: 'did:ethr:sepolia',
controllerKeyId:
'04155ee0cbefeecd80de63a62b4ed8f0f97ac22a58f76a265903b9acab79bf018c7037e2bd897812170c92a4c978d6a10481491a37299d74c4bd412a111a4ac875',
keys: [
Expand Down Expand Up @@ -320,7 +320,7 @@ export default (testContext: {
expect(comparableOutput).toEqual({
credentialSubject: { name: 'Alice', id: 'did:example:subject' },
issuer: {
id: 'did:ethr:goerli:0x03155ee0cbefeecd80de63a62b4ed8f0f97ac22a58f76a265903b9acab79bf018c',
id: 'did:ethr:sepolia:0x03155ee0cbefeecd80de63a62b4ed8f0f97ac22a58f76a265903b9acab79bf018c',
},
type: ['VerifiableCredential', 'Example'],
'@context': ['https://www.w3.org/2018/credentials/v1'],
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/default/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ didManager:
$require: '@veramo/data-store#DIDStore'
$args:
- $ref: /dbConnection
defaultProvider: did:ethr:goerli
defaultProvider: did:ethr:sepolia
providers:
did:ethr:
$require: '@veramo/did-provider-ethr#EthrDIDProvider'
Expand All @@ -234,12 +234,12 @@ didManager:
rpcUrl: https://mainnet.infura.io/v3/3586660d179141e3801c3895de1c2eba
gas: 1000001
ttl: 31104001
did:ethr:goerli:
did:ethr:sepolia:
$require: '@veramo/did-provider-ethr#EthrDIDProvider'
$args:
- defaultKms: local
network: goerli
rpcUrl: https://goerli.infura.io/v3/3586660d179141e3801c3895de1c2eba
network: sepolia
rpcUrl: https://sepolia.infura.io/v3/3586660d179141e3801c3895de1c2eba
gas: 1000001
ttl: 31104001
did:web:
Expand Down
8 changes: 4 additions & 4 deletions packages/core-types/src/types/IDIDManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ export interface IDIDManager extends IPluginMethodMap {
* alias: 'alice'
* })
*
* const goerliIdentifiers = await agent.didManagerFind({
* provider: 'did:ethr:goerli'
* const sepoliaIdentifiers = await agent.didManagerFind({
* provider: 'did:ethr'
* })
* ```
*/
Expand All @@ -279,7 +279,7 @@ export interface IDIDManager extends IPluginMethodMap {
* ```typescript
* const identifier = await agent.didManagerGetByAlias({
* alias: 'charlie',
* provider: 'did:ethr:goerli'
* provider: 'did:ethr'
* })
* ```
*/
Expand All @@ -297,7 +297,7 @@ export interface IDIDManager extends IPluginMethodMap {
* ```typescript
* const identifier = await agent.didManagerCreate({
* alias: 'charlie',
* provider: 'did:ethr:goerli',
* provider: 'did:ethr',
* kms: 'local'
* })
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ describe('credential-w3c full flow', () => {
new DIDManager({
providers: {
'did:key': new KeyDIDProvider({ defaultKms: 'local' }),
'did:ethr:goerli': new EthrDIDProvider({
'did:ethr': new EthrDIDProvider({
defaultKms: 'local',
network: 'goerli',
network: 'sepolia',
}),
},
store: new MemoryDIDStore(),
Expand All @@ -79,7 +79,7 @@ describe('credential-w3c full flow', () => {
],
})
didKeyIdentifier = await agent.didManagerCreate()
didEthrIdentifier = await agent.didManagerCreate({ provider: 'did:ethr:goerli' })
didEthrIdentifier = await agent.didManagerCreate({ provider: 'did:ethr' })
credential = {
issuer: didKeyIdentifier.did,
'@context': ['custom:example.context'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ describe('@veramo/credential-w3c', () => {
credentialStatus: {
type: 'EthrStatusRegistry2019',
// TODO(nickreynolds): deploy
id: 'goerli:0x97fd27892cdcD035dAe1fe71235c636044B59348',
id: 'sepolia:0x97fd27892cdcD035dAe1fe71235c636044B59348',
},
iss: 'did:ethr:0x54d59e3ffd76917f62db702ac354b17f3842955e',
}
Expand Down
Loading

0 comments on commit 6029625

Please sign in to comment.