Skip to content

Bump nostr-tools from 1.10.1 to 1.14.0 #135

Bump nostr-tools from 1.10.1 to 1.14.0

Bump nostr-tools from 1.10.1 to 1.14.0 #135

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
jobs:
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm test
env:
NOSTR_RELAYS: ${{ vars.NOSTR_RELAYS_TEST }}
NOSTR_PRIVATE_KEY: ${{ secrets.NOSTR_PRIVATE_KEY_TEST }}
e2e-test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
# kind 1 (default)
- uses: ./
with:
relays: ${{ vars.NOSTR_RELAYS_TEST }}
private-key: ${{ secrets.NOSTR_PRIVATE_KEY_TEST }}
content: |
test
https://github.com/snow-actions/nostr
id: publish
- run: test "$event" != ''
env:
event: ${{ steps.publish.outputs.event }}
# reply
- uses: ./
with:
relays: ${{ vars.NOSTR_RELAYS_TEST }}
private-key: ${{ secrets.NOSTR_PRIVATE_KEY_TEST }}
content: test reply
tags: |
- ["e", "${{ fromJson(steps.publish.outputs.event).id }}", "", "root"]
- ["p", "${{ fromJson(steps.publish.outputs.event).pubkey }}"]
id: publish-reply
- run: test "$event" != ''
env:
event: ${{ steps.publish-reply.outputs.event }}
# kind 2
- uses: ./
with:
relays: ${{ vars.NOSTR_RELAYS_TEST }}
private-key: ${{ secrets.NOSTR_PRIVATE_KEY_TEST }}
content: wss://relay.nostr.wirednet.jp
kind: 2
id: publish-2
- run: test $(echo "$event" | jq '.kind') = 2
env:
event: ${{ steps.publish-2.outputs.event }}