Skip to content

Commit 147802b

Browse files
committed
Maintain Dagger Ruby for Ruby 4
1 parent 6d16384 commit 147802b

60 files changed

Lines changed: 1100 additions & 1842 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Bug report
2+
description: Report reproducible incorrect behavior
3+
title: ""
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Do not include credentials, private source code, or personal data.
9+
- type: input
10+
id: gem_version
11+
attributes:
12+
label: Dagger Ruby version
13+
validations:
14+
required: true
15+
- type: input
16+
id: versions
17+
attributes:
18+
label: Ruby and Dagger versions
19+
placeholder: Ruby 4.0.6, Dagger 0.21.8
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: reproduction
24+
attributes:
25+
label: Minimal reproduction
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: expected
30+
attributes:
31+
label: Expected behavior
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: actual
36+
attributes:
37+
label: Actual behavior
38+
validations:
39+
required: true

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security report
4+
url: https://github.com/boringcache/dagger_ruby/security/advisories/new
5+
about: Report suspected vulnerabilities privately

‎.github/dependabot.yml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: bundler
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
groups:
9+
development-dependencies:
10+
dependency-type: development
11+
12+
- package-ecosystem: bundler
13+
directory: /examples/dummy_app
14+
schedule:
15+
interval: weekly
16+
17+
- package-ecosystem: github-actions
18+
directory: /
19+
schedule:
20+
interval: weekly

‎.github/pull_request_template.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## What changed?
2+
3+
Describe the user-visible behavior and why it is needed.
4+
5+
## Verification
6+
7+
- [ ] `bin/ci`
8+
- [ ] Live Dagger tests, if the GraphQL contract changed
9+
- [ ] No credentials, personal data, generated gems, or dependency directories

‎.github/workflows/main.yml‎

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,45 @@
1-
name: Ruby
1+
name: CI
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
76
pull_request:
87

98
permissions:
109
contents: read
1110

11+
concurrency:
12+
group: ci-${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1215
jobs:
13-
build:
16+
quality:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
steps:
20+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
21+
- name: Set up Ruby
22+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
23+
with:
24+
ruby-version: "4.0.6"
25+
bundler-cache: true
26+
- name: Verify gem
27+
run: bin/ci
28+
29+
dagger:
1430
runs-on: ubuntu-latest
15-
name: Ruby ${{ matrix.ruby }}
16-
strategy:
17-
matrix:
18-
ruby:
19-
- '3.4.4'
20-
- '3.3.4'
21-
- '3.2.4'
22-
- '3.1.4'
31+
timeout-minutes: 15
2332
steps:
24-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2534
- name: Set up Ruby
26-
uses: ruby/setup-ruby@v1
35+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
2736
with:
28-
ruby-version: ${{ matrix.ruby }}
37+
ruby-version: "4.0.6"
2938
bundler-cache: true
30-
- name: Run tests
31-
run: bundle exec rake test
39+
- name: Run live Dagger contract tests
40+
uses: dagger/dagger-for-github@27b130bf0f79a7f6fbbbe0fbca6760dc9bb40a77 # v8.4.1
41+
with:
42+
version: "0.21.8"
43+
dagger-flags: --silent
44+
verb: run
45+
args: -- env DAGGER_LIVE_TESTS=1 bundle exec ruby test/integration/test_dagger_engine.rb

‎.github/workflows/publish.yml‎

Lines changed: 21 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,30 @@
1-
name: Publish Gem
1+
name: Publish gem
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
tag:
7-
description: 'Version tag to publish'
8-
required: true
9-
default: 'v0.8.0'
105

11-
permissions:
12-
contents: write
6+
permissions: {}
137

148
jobs:
159
publish:
10+
if: github.ref == 'refs/heads/main'
1611
runs-on: ubuntu-latest
17-
12+
timeout-minutes: 15
13+
environment: release
14+
permissions:
15+
contents: write
16+
id-token: write
1817
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
ref: ${{ inputs.tag }}
22-
fetch-depth: 0
23-
24-
- name: Set up Ruby
25-
uses: ruby/setup-ruby@v1
26-
with:
27-
ruby-version: '3.4.4'
28-
bundler-cache: true
29-
30-
- name: Validate gem
31-
run: |
32-
ruby scripts/validate.rb
33-
34-
- name: Build gem
35-
run: |
36-
gem build dagger_ruby.gemspec
37-
38-
- name: Publish to RubyGems
39-
run: |
40-
mkdir -p ~/.gem
41-
echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
42-
chmod 600 ~/.gem/credentials
43-
gem push dagger_ruby-*.gem
44-
env:
45-
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
46-
47-
- name: Create GitHub Release
48-
uses: softprops/action-gh-release@v1
49-
with:
50-
files: dagger_ruby-*.gem
51-
generate_release_notes: true
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19+
with:
20+
fetch-depth: 0
21+
persist-credentials: false
22+
- name: Set up Ruby
23+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
24+
with:
25+
ruby-version: "4.0.6"
26+
bundler-cache: true
27+
- name: Verify release
28+
run: bin/ci
29+
- name: Publish with RubyGems trusted publishing
30+
uses: rubygems/release-gem@7f9650160c1a4e7989fdc9855807bdbd421d8b6b # v1.4.1

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77
/spec/reports/
88
/tmp/
99
vendor/bundle/
10+
vendor/
1011
coverage
1112
*.gem
13+
.DS_Store

‎.rubocop.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
plugins:
2+
- rubocop-minitest
3+
- rubocop-rake
4+
15
AllCops:
2-
TargetRubyVersion: 3.1
6+
TargetRubyVersion: 4.0
37
NewCops: enable
48
SuggestExtensions: false
59
Exclude:
@@ -59,4 +63,3 @@ Lint/DuplicateBranch:
5963
# Naming conventions
6064
Naming/PredicateMethod:
6165
Enabled: false
62-

‎.ruby-version‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-3.4.4
1+
4.0.6

0 commit comments

Comments
 (0)