Skip to content

Commit 93ca3c1

Browse files
authored
Merge pull request #421 from ssbc/actions_update
Actions: update checkout + node-setup verisons
2 parents 9709bce + b4910f0 commit 93ca3c1

19 files changed

+49
-50
lines changed

.github/workflows/node.js.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
licenses:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
- name: REUSE Compliance Check
2222
uses: fsfe/reuse-action@v1
2323

@@ -30,9 +30,9 @@ jobs:
3030
node-version: [16.x, 18.x]
3131

3232
steps:
33-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v3
3434
- name: Use Node.js ${{ matrix.node-version }}
35-
uses: actions/setup-node@v1
35+
uses: actions/setup-node@v3
3636
with:
3737
node-version: ${{ matrix.node-version }}
3838
- run: npm install
@@ -43,26 +43,25 @@ jobs:
4343
needs: test
4444

4545
runs-on: ubuntu-latest
46-
4746
steps:
48-
- uses: actions/checkout@v2
49-
- name: Use Node.js 16.x
50-
uses: actions/setup-node@v1
47+
- uses: actions/checkout@v3
48+
- name: Use Node.js 18.x
49+
uses: actions/setup-node@v3
5150
with:
52-
node-version: 16.x
51+
node-version: 18.x
5352
- run: npm install
5453
- name: Benchmark
5554
run: npm run benchmark
5655
- id: get-comment-body
5756
name: Gather results
5857
run: |
59-
body=$(cat /tmp/ssb-db2-benchmark/benchmark.md)
60-
body="${body//'%'/'%25'}"
61-
body="${body//$'\n'/'%0A'}"
62-
body="${body//$'\r'/'%0D'}"
63-
echo ::set-output name=body::$body
58+
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
59+
echo "BENCHMARK_OUTPUT<<$EOF" >> $GITHUB_OUTPUT
60+
cat /tmp/ssb-db2-benchmark/benchmark.md >> $GITHUB_OUTPUT
61+
echo "$EOF" >> $GITHUB_OUTPUT
6462
- name: Publish comment
65-
uses: mshick/add-pr-comment@v1
63+
uses: mshick/add-pr-comment@v2
6664
with:
67-
message: ${{ steps.get-comment-body.outputs.body }}
65+
message: ${{ steps.get-comment-body.outputs.BENCHMARK_OUTPUT }}
6866
repo-token: ${{ secrets.GITHUB_TOKEN }}
67+
allow-repeats: true

test/basic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,5 +663,5 @@ test('getMsg from uri id', (t) => {
663663
})
664664

665665
test('teardown', (t) => {
666-
sbot.close(t.end)
666+
sbot.close(true, () => t.end())
667667
})

test/compat.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mkdirp.sync(dir)
1818

1919
const keys = ssbKeys.loadOrCreateSync(path.join(dir, 'secret'))
2020

21-
let sbot = SecretStack({ appKey: caps.shs })
21+
const sbot = SecretStack({ appKey: caps.shs })
2222
.use(require('../'))
2323
.use(require('../compat/db'))
2424
.call(null, {
@@ -58,5 +58,5 @@ test('keys', (t) => {
5858
})
5959

6060
test('teardown sbot', (t) => {
61-
sbot.close(() => t.end())
61+
sbot.close(true, () => t.end())
6262
})

test/create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,5 +596,5 @@ test('addTransaction classic and buttwoo', (t) => {
596596
})
597597

598598
test('teardown', (t) => {
599-
sbot.close(t.end)
599+
sbot.close(true, () => t.end())
600600
})

test/createHistoryStream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ test('Encrypted', (t) => {
212212
pull.collect((err, results) => {
213213
t.equal(results.length, 4)
214214
t.equal(typeof results[3].content, 'string')
215-
sbot.close(t.end)
215+
sbot.close(true, () => t.end())
216216
})
217217
)
218218
})

test/createLogStream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,5 @@ test.skip('createLogStream (gt)', (t) => {
164164
})
165165

166166
test('teardown sbot', (t) => {
167-
sbot.close(() => t.end())
167+
sbot.close(true, () => t.end())
168168
})

test/delete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,5 @@ test('delete a bunch', async (t) => {
103103
})
104104

105105
test('teardown', (t) => {
106-
sbot.close(t.end)
106+
sbot.close(true, () => t.end())
107107
})

test/ebt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,5 @@ test('buttwoo-v1 sequenceNativeMsg', (t) => {
169169
})
170170

171171
test('teardown sbot', (t) => {
172-
sbot.close(true, t.end)
172+
sbot.close(true, () => t.end())
173173
})

test/feedstate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test('Base', (t) => {
3636
t.error(err)
3737
t.equal(state.id, postMsg.key)
3838
t.equal(state.sequence, postMsg.value.sequence)
39-
sbot.close(t.end)
39+
sbot.close(true, () => t.end())
4040
})
4141
})
4242
})

test/full-mentions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,5 @@ test('getMessagesByMention live', { timeout: 5000 }, (t) => {
110110
})
111111

112112
test('teardown sbot', (t) => {
113-
sbot.close(() => t.end())
113+
sbot.close(true, () => t.end())
114114
})

0 commit comments

Comments
 (0)