Skip to content

Commit 5d22e47

Browse files
authored
use shared config for CI, stale, and triage (#54)
* use shared config for CI, stale, and triage * use main now that shared-config change has been merged rubyatscale/shared-config#8
1 parent 189a755 commit 5d22e47

File tree

3 files changed

+22
-62
lines changed

3 files changed

+22
-62
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -5,67 +5,10 @@ on:
55
branches:
66
- main
77
pull_request:
8-
schedule:
9-
- cron: "0 0 * * *"
108

119
jobs:
12-
minitest:
13-
runs-on: ubuntu-latest
14-
strategy:
15-
matrix:
16-
ruby:
17-
# See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions
18-
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
19-
- "3.0"
20-
- 3.1
21-
- 3.2
22-
env:
23-
BUNDLE_GEMFILE: Gemfile
24-
name: "Minitest tests: Ruby ${{ matrix.ruby }}"
25-
steps:
26-
- uses: actions/checkout@v4
27-
- name: Set up Ruby ${{ matrix.ruby }}
28-
uses: ruby/setup-ruby@v1
29-
with:
30-
bundler-cache: true
31-
ruby-version: ${{ matrix.ruby }}
32-
- name: Run tests
33-
run: bundle exec rake
34-
static_type_check:
35-
name: "Type Check"
36-
runs-on: ubuntu-latest
37-
steps:
38-
- uses: actions/checkout@v4
39-
- name: Set up Ruby
40-
uses: ruby/setup-ruby@v1
41-
with:
42-
bundler-cache: true
43-
ruby-version: 3.1
44-
- name: Run static type checks
45-
run: bundle exec srb tc
46-
rubocop:
47-
runs-on: ubuntu-latest
48-
name: Rubocop
49-
steps:
50-
- uses: actions/checkout@v4
51-
- name: Set up Ruby
52-
uses: ruby/setup-ruby@v1
53-
with:
54-
bundler-cache: true
55-
ruby-version: 3.1
56-
- name: Run style checks
57-
run: bundle exec rubocop
58-
notify_on_failure:
59-
runs-on: ubuntu-latest
60-
needs: [minitest, static_type_check, rubocop]
61-
if: ${{ failure() && github.ref == 'refs/heads/main' }}
62-
env:
63-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
64-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
65-
steps:
66-
- uses: slackapi/[email protected]
67-
with:
68-
payload: |
69-
{
70-
"text": "${{ github.repository }}/${{ github.ref }}: FAILED\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
71-
}
10+
call-workflow-from-shared-config:
11+
uses: rubyatscale/shared-config/.github/workflows/ci.yml@main
12+
secrets: inherit
13+
with:
14+
test-command: "bundle exec rake"

.github/workflows/stale.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: 'Close stale issues and PRs'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
jobs:
7+
call-workflow-from-shared-config:
8+
uses: rubyatscale/shared-config/.github/workflows/stale.yml@main

.github/workflows/triage.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Label issues as "triage"
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
jobs:
8+
call-workflow-from-shared-config:
9+
uses: rubyatscale/shared-config/.github/workflows/triage.yml@main

0 commit comments

Comments
 (0)