Skip to content

Commit

Permalink
Merge branch 'oss' into 'master'
Browse files Browse the repository at this point in the history
feat: github preparations

See merge request nstmrt/rubygems/sbmt-strangler!16
  • Loading branch information
dsalahutdinov committed May 30, 2024
2 parents a845d40 + eb99cb4 commit 0d14f3f
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 24 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Ruby

on:
push:
branches: [ master ]
pull_request:
branches: [ '**' ]

jobs:
lint:
runs-on: ubuntu-latest
env:
RUBY_VERSION: "3.3"
name: Rubocop
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Ruby w/ same version as image
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Install dependencies
run: |
gem install dip
dip bundle install
- name: Run linter
run: dip rubocop

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ '3.1', '3.2', '3.3' ]
env:
RUBY_VERSION: ${{ matrix.ruby }}
name: Ruby ${{ matrix.ruby }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Ruby w/ same version as image
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: |
gem install dip
dip provision
- name: Run tests
run: dip appraisal rspec --format RspecJunitFormatter --out test-results/rspec_${{ matrix.ruby }}.xml --format documentation
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include:

tests:
stage: test
image: dreg.sbmt.io/dhub/library/ruby:$RUBY_VERSION
image: ${BUILD_CONF_HARBOR_REGISTRY}/dhub/library/ruby:$RUBY_VERSION
parallel:
matrix:
- RUBY_VERSION: ['3.1', '3.2', '3.3']
Expand Down
12 changes: 0 additions & 12 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

source "https://nexus.sbmt.io/repository/rubygems/"
source "https://rubygems.org"

gemspec
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 SberMarket Tech

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 1 addition & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
services:
ruby:
build:
context: .
dockerfile: Dockerfile
args:
RUBY_VERSION: ${RUBY_VERSION:-3.3}
RUBYGEMS_VERSION: 3.5.7
BUNDLER_VERSION: 2.5.7
image: sbmt-strangler-dev:0.1.0-ruby_${RUBY_VERSION:-3.3}
image: ruby:${RUBY_VERSION:-3.2}
environment:
HISTFILE: /app/tmp/.bash_history
BUNDLE_PATH: /usr/local/bundle
Expand Down
4 changes: 2 additions & 2 deletions sbmt-strangler.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Gem::Specification.new do |spec|

spec.summary = "Utility for strangler pattern"
spec.description = spec.summary
spec.homepage = "https://gitlab.sbmt.io/nstmrt/rubygems/sbmt-strangler"
spec.homepage = "https://github.com/SberMarket-Tech/sbmt-strangler"
spec.required_ruby_version = ">= 3.1.0"

spec.metadata["allowed_push_host"] = "https://nexus.sbmt.io"
spec.metadata["allowed_push_host"] = "https://rubygems.org"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
Expand Down

0 comments on commit 0d14f3f

Please sign in to comment.