-
-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (61 loc) · 1.91 KB
/
node.js.contract.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# SPDX-FileCopyrightText: © 2023–2024 Kevin Lu
# SPDX-Licence-Identifier: AGPL-3.0-or-later
name: Contract tests
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/node.js.contract.yml
- test/contract/*
schedule:
# Daily after 12:00 UTC, depending on Actions availability
- cron: "0 12 * * *"
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
contract-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- run: yarn
- run: yarn test:contract --verbose
- uses: codecov/codecov-action@v5
if: success() || failure()
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: contract
install-count:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: bastion-bot
- uses: actions/checkout@v4
with:
repository: ${{ secrets.METRICS_REPOSITORY }}
path: metrics
token: ${{ secrets.METRICS_GH_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: bastion-bot/yarn.lock
- working-directory: bastion-bot
run: yarn
- working-directory: bastion-bot
run: node -r dotenv/config test/install-count.mjs > ../metrics/bastion-bot-discord-application/$(date -u +"%Y-%m-%dT%H_%M_%SZ").json
env:
DISCORD_TOKEN: ${{ secrets.PRODUCTION_DISCORD_TOKEN }}
- uses: DawnbrandBots/.github/actions/commit-push@main
with:
message: "Transform: ${{ github.run_number }} (${{ github.run_id }})"
working-directory: metrics