Skip to content

Commit 56bedc6

Browse files
authored
chore: add scheduled test (#100)
1 parent 84c0241 commit 56bedc6

File tree

4 files changed

+44
-5
lines changed

4 files changed

+44
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
ruby: ['2.5', '2.6', '2.7', '3.0', '3.1']
1212
name: 💎 Ruby ${{ matrix.ruby }}
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
with:
1616
fetch-depth: 0 # gives the commit linter access to previous commits
1717

.github/workflows/initiate_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: 🚀 Create release PR
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0 # gives the changelog generator access to all previous commits
1818

@@ -28,7 +28,7 @@ jobs:
2828
git push -q -u origin "release-$VERSION"
2929
3030
- name: Get changelog diff
31-
uses: actions/github-script@v5
31+
uses: actions/github-script@v6
3232
with:
3333
script: |
3434
const get_change_log_diff = require('./scripts/get_changelog_diff.js')

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
if: github.event.pull_request.merged && startsWith(github.head_ref, 'release-')
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
1818

19-
- uses: actions/github-script@v5
19+
- uses: actions/github-script@v6
2020
with:
2121
script: |
2222
const get_change_log_diff = require('./scripts/get_changelog_diff.js')
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Scheduled tests
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# Monday at 9:00 UTC
7+
- cron: "0 9 * * 1"
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: "3.1"
18+
bundler-cache: true
19+
20+
- name: Test
21+
env:
22+
STREAM_KEY: ${{ secrets.STREAM_CHAT_API_KEY }}
23+
STREAM_SECRET: ${{ secrets.STREAM_CHAT_API_SECRET }}
24+
run: |
25+
# Retry 3 times because tests can be flaky
26+
for _ in 1 2 3;
27+
do
28+
bundle exec rspec ./spec --require spec_helper && break
29+
done
30+
31+
- name: Notify Slack if failed
32+
uses: voxmedia/github-action-slack-notify-build@v1
33+
if: failure()
34+
with:
35+
channel_id: C02RPDF7T63
36+
color: danger
37+
status: FAILED
38+
env:
39+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}

0 commit comments

Comments
 (0)