-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (41 loc) · 1.18 KB
/
ci.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
name: ci
on: [push, pull_request]
jobs:
qa:
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Freeze autogenerated files
run: |
chmod 0444 Gemfile.lock
- name: Setup Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: |
bin/rspec
merge:
if: ${{ contains(github.event.pull_request.labels.*.name, 'automerge') }}
runs-on: ubuntu-latest
needs: qa
permissions:
contents: write
pull-requests: write
steps:
- name: Merge pull request
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: "automerge"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: |
${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }})
${{ github.event.pull_request.body }}
MERGE_DELETE_BRANCH: "true"