Skip to content

Commit

Permalink
Merge pull request #1 from khiav223577/fix/workflows
Browse files Browse the repository at this point in the history
Setup tests and submit code coverage
  • Loading branch information
khiav223577 authored Nov 21, 2024
2 parents 63325c3 + 099e6ed commit 6a20a5d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 87 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/actionlint.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/jira.yaml

This file was deleted.

26 changes: 19 additions & 7 deletions .github/workflows/run-tests.yml → .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
name: hashicorp/vault-ruby/run-tests
name: Ruby
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
jobs:
test:
strategy:
fail-fast: false
matrix:
# https://endoflife.date/ruby
ruby: ["2.7", "3.0", "3.1", "3.2"]
vault: ["1.11.9", "1.12.5", "1.13.1"]
ruby: ['2.7', '3.0', '3.1', '3.2']
vault: ['1.13.13', '1.15.5', '1.17.6']
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
- name: Checkout
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
Expand All @@ -28,6 +35,11 @@ jobs:
mv vault "$HOME/bin"
echo "$HOME/bin" >> "$GITHUB_PATH"
- run: bundle exec rake
- name: Publish code coverage
if: ${{ success() && env.CC_TEST_REPORTER_ID }}
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

permissions:
contents: read
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@

source "https://rubygems.org"

group :test do
gem 'simplecov', '< 0.18'
end

gemspec
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

require 'simplecov'
SimpleCov.start 'test_frameworks'

$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "vault_ruby_client"

Expand Down
1 change: 1 addition & 0 deletions vault_ruby_client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake", "~> 13.2"
spec.add_development_dependency "rspec", "~> 3.13"
spec.add_development_dependency "webmock", "~> 3.24"
spec.add_development_dependency "webrick", "~> 1.9"
end

0 comments on commit 6a20a5d

Please sign in to comment.