Skip to content

Commit 9683ee5

Browse files
committed
add lockfile and dependabot
1 parent d560159 commit 9683ee5

File tree

5 files changed

+114
-9
lines changed

5 files changed

+114
-9
lines changed

.github/dependabot.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
pull-request-branch-name:
10+
separator: "-"
11+
- package-ecosystem: "bundler"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
pull-request-branch-name:
16+
separator: "-"

.github/workflows/dependabot.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Dependabot automations
2+
on: pull_request
3+
4+
jobs:
5+
dependabot:
6+
runs-on: ubuntu-latest
7+
if: github.event.pull_request.user.login == 'dependabot[bot]'
8+
env:
9+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: checkout PR branch
13+
# set upstream for other gh commands
14+
run: gh pr checkout ${{github.event.pull_request.number}}
15+
- name: Fetch PR metadata
16+
id: metadata
17+
uses: dependabot/fetch-metadata@v1
18+
- name: Approve PR
19+
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
20+
run: |
21+
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; then
22+
gh pr review --approve
23+
else
24+
echo "PR already approved"
25+
fi
26+
- name: Enable auto-merge
27+
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
28+
run: gh pr merge --auto --squash
29+
30+
permissions:
31+
contents: write
32+
pull-requests: write

.github/workflows/ruby.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# install dependencies and run tests
2-
# https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
1+
name: Ruby
32

43
on:
54
push:
6-
paths-ignore:
7-
- '**.md'
5+
branches: [ main ]
86
pull_request:
97
types: [ opened, edited, synchronize ]
108

@@ -13,20 +11,19 @@ jobs:
1311
runs-on: ubuntu-latest
1412

1513
strategy:
14+
fail-fast: false
1615
matrix:
17-
ruby-version: [ 3.0, 2.7 ]
16+
ruby-version: [ 3.1, 3.0, 2.7 ]
1817

1918
name: Ruby ${{ matrix.ruby-version }}
2019

2120
steps:
2221
- name: clone ${{ github.repository }}
23-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2423
- name: setup Ruby ${{ matrix.ruby-version }}
2524
uses: ruby/setup-ruby@v1
2625
with:
2726
ruby-version: ${{ matrix.ruby-version }}
2827
bundler-cache: true
29-
- name: install dependencies
30-
run: bundle install
3128
- name: run tests
3229
run: bundle exec rspec

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
*.gem
22
.byebug_history
33
coverage
4-
Gemfile.lock

Gemfile.lock

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
PATH
2+
remote: .
3+
specs:
4+
rspec-uuid (0.5.0)
5+
rspec-expectations (>= 3)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
activesupport (7.0.4.2)
11+
concurrent-ruby (~> 1.0, >= 1.0.2)
12+
i18n (>= 1.6, < 2)
13+
minitest (>= 5.1)
14+
tzinfo (~> 2.0)
15+
byebug (11.1.3)
16+
codecov (0.6.0)
17+
simplecov (>= 0.15, < 0.22)
18+
concurrent-ruby (1.2.0)
19+
diff-lcs (1.5.0)
20+
docile (1.4.0)
21+
faker (3.1.1)
22+
i18n (>= 1.8.11, < 2)
23+
i18n (1.12.0)
24+
concurrent-ruby (~> 1.0)
25+
minitest (5.17.0)
26+
rspec (3.12.0)
27+
rspec-core (~> 3.12.0)
28+
rspec-expectations (~> 3.12.0)
29+
rspec-mocks (~> 3.12.0)
30+
rspec-core (3.12.1)
31+
rspec-support (~> 3.12.0)
32+
rspec-expectations (3.12.2)
33+
diff-lcs (>= 1.2.0, < 2.0)
34+
rspec-support (~> 3.12.0)
35+
rspec-mocks (3.12.3)
36+
diff-lcs (>= 1.2.0, < 2.0)
37+
rspec-support (~> 3.12.0)
38+
rspec-support (3.12.0)
39+
simplecov (0.21.2)
40+
docile (~> 1.1)
41+
simplecov-html (~> 0.11)
42+
simplecov_json_formatter (~> 0.1)
43+
simplecov-html (0.12.3)
44+
simplecov_json_formatter (0.1.4)
45+
tzinfo (2.0.6)
46+
concurrent-ruby (~> 1.0)
47+
48+
PLATFORMS
49+
ruby
50+
51+
DEPENDENCIES
52+
activesupport
53+
byebug
54+
codecov
55+
faker
56+
rspec
57+
rspec-uuid!
58+
simplecov
59+
60+
BUNDLED WITH
61+
2.3.17

0 commit comments

Comments
 (0)