-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (59 loc) · 1.98 KB
/
test.yml
File metadata and controls
66 lines (59 loc) · 1.98 KB
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
62
63
64
65
66
name: Test
on: [push]
jobs:
test:
strategy:
fail-fast: false
matrix:
ruby-version:
- '3.2'
- '3.3'
- '3.4'
name: Ruby ${{ matrix.ruby-version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout@v6 see https://github.com/actions/checkout/releases/tag/v6
- name: Set up Ruby
uses: ruby/setup-ruby@4c56a21280b36d862b5fc31348f463d60bdc55d5 # ruby/setup-ruby@v1 see https://github.com/ruby/setup-ruby/tree/v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
# A utility job upon which Branch Protection can depend,
# thus remaining agnostic of the matrix.
test_matrix:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Matrix
needs: test
steps:
- name: Check build matrix status
if: ${{ needs.test.result != 'success' }}
run: exit 1
# notify:
# # Run only on master, but regardless of whether tests past:
# if: ${{ always() && github.ref == 'refs/heads/master' }}
#
# needs: test_matrix
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: 8398a7/action-slack@v3
# with:
# status: custom
# fields: workflow,commit,author
# custom_payload: |
# {
# channel: 'C7FQWGDHP',
# username: 'CI – ' + '${{ github.repository }}'.split('/')[1],
# icon_emoji: ':hammer_and_wrench:',
# attachments: [{
# color: '${{ needs.test_matrix.result }}' === 'success' ? 'good' : '${{ needs.test_matrix.result }}' === 'failure' ? 'danger' : 'warning',
# text: `${process.env.AS_WORKFLOW} against \`${{ github.ref }}\` (${process.env.AS_COMMIT}) for ${{ github.actor }} resulted in *${{ needs.test_matrix.result }}*.`
# }]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}