Skip to content

Commit cb6e496

Browse files
authored
Merge pull request #13 from patch-technology/lovisa/run-specs-once-a-day
Build gem and run specs once a day
2 parents ae05ff9 + e661cf7 commit cb6e496

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/health_check.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Health check
2+
on:
3+
schedule:
4+
- cron: '0 9 * * * America/Los_Angeles'
5+
6+
jobs:
7+
build-and-test:
8+
name: Build and Test
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out code
12+
uses: actions/checkout@v2
13+
14+
- name: Setup Ruby
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: 2.7.1
18+
19+
- name: Install Ruby Dependencies
20+
run: bundle install
21+
22+
- name: Build Gem
23+
run: gem build -o patch_ruby.gem patch_ruby.gemspec
24+
25+
- name: Run RSpec
26+
env:
27+
PATCH_RUBY_API_KEY: ${{ secrets.SANDBOX_API_KEY }}
28+
run: bundle exec rspec
29+
30+
failure-notification:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- run: exit 1
35+
- name: Health check failure
36+
if: always()
37+
uses: kpritam/slack-job-status-action@v1
38+
with:
39+
job-status: ${{ job.status }}
40+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
41+
channel: github-actions

0 commit comments

Comments
 (0)