Skip to content

Commit b8ae278

Browse files
authored
Merge pull request #85 from microsoft/feat/upgrades-ruby-targets
feat: upgrade ruby CI matrix to 3.3, 3.4 and 4.0
2 parents 1667160 + 2ab5a2e commit b8ae278

3 files changed

Lines changed: 57 additions & 3 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
name: kiota-abstractions-ruby-branch-protection
5+
description: Branch protection policy for the kiota-abstractions-ruby repository
6+
resource: repository
7+
configuration:
8+
branchProtectionRules:
9+
10+
- branchNamePattern: main
11+
# Specifies whether this branch can be deleted. boolean
12+
allowsDeletions: false
13+
# Specifies whether forced pushes are allowed on this branch. boolean
14+
allowsForcePushes: false
15+
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
16+
dismissStaleReviews: true
17+
# Specifies whether admins can overwrite branch protection. boolean
18+
isAdminEnforced: false
19+
# Indicates whether "Require a pull request before merging" is enabled. boolean
20+
requiresPullRequestBeforeMerging: true
21+
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
22+
requiredApprovingReviewsCount: 1
23+
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
24+
requireCodeOwnersReview: true
25+
# Are commits required to be signed. boolean
26+
requiresCommitSignatures: false
27+
# Are conversations required to be resolved before merging? boolean
28+
requiresConversationResolution: true
29+
# Are merge commits prohibited from being pushed to this branch. boolean
30+
requiresLinearHistory: false
31+
# Required status checks to pass before merging
32+
requiredStatusChecks:
33+
- license/cla
34+
- check-ruby-version-matrix
35+
# Require branches to be up to date before merging. boolean
36+
requiresStrictStatusChecks: false
37+
# Indicates whether there are restrictions on who can push. boolean
38+
restrictsPushes: false
39+
# Restrict who can dismiss pull request reviews. boolean
40+
restrictsReviewDismissals: false

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
ref: ${{ github.ref }}
2020
- uses: ruby/setup-ruby@v1
2121
with:
22-
ruby-version: '3.2'
22+
ruby-version: '3.4'
2323
bundler-cache: true
2424
bundler: 'latest'
2525
cache-version: 1

.github/workflows/ruby.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
os: [ubuntu-latest, macos-latest]
15-
ruby-version: ['3.0', '3.1', '3.2', head, jruby, jruby-head, truffleruby, truffleruby-head]
15+
ruby-version: ['3.3', '3.4', '4.0', head, jruby, jruby-head, truffleruby, truffleruby-head]
1616
runs-on: ${{ matrix.os }}
1717
steps:
1818
- uses: actions/checkout@v6
@@ -25,10 +25,24 @@ jobs:
2525
- name: Run tests
2626
run: bundle exec rake
2727
- name: Upload artifacts for ruby version 3 and ubuntu
28-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby-version == '3.2'}}
28+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby-version == '3.4'}}
2929
uses: actions/upload-artifact@v7
3030
with:
3131
name: drop
3232
path: |
3333
./Gemfile.lock
3434
./README.md
35+
36+
# The check-ruby-version-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
37+
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
38+
check-ruby-version-matrix:
39+
runs-on: ubuntu-latest
40+
needs: [build]
41+
if: always()
42+
steps:
43+
- name: All build matrix options are successful
44+
if: ${{ !(contains(needs.*.result, 'failure')) }}
45+
run: exit 0
46+
- name: One or more build matrix options failed
47+
if: ${{ contains(needs.*.result, 'failure') }}
48+
run: exit 1

0 commit comments

Comments
 (0)