Skip to content

Commit

Permalink
Add workflow hashicorp/vault-ruby/run-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent b34b02a commit 156a350
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: hashicorp/vault-ruby/run-tests
on:
push:
branches:
- master
jobs:
test:
if: # GitHub does not currently support regular expressions inside if conditions
# github.ref == 'refs/tags//^v[0-9]+\.[0-9]+\.[0-9]+.*/'
runs-on: ubuntu-latest
container:
image: ruby:${{ matrix.ruby-version }}
strategy:
matrix:
ruby-version:
- 3.1.2
- 3.0.4
- 2.7.6
- 2.6.10
vault-version:
- 1.11.1
- 1.10.5
- 1.9.8
steps:
- uses: actions/checkout@v3.5.0
- name: restore_cache
uses: actions/cache@v3.3.1
with:
key: v1-dependencies-bundler-${{ matrix.ruby-version }}-{{ checksum "vault.gemspec" }}
restore-keys: |-
v1-dependencies-bundler-${{ matrix.ruby-version }}-{{ checksum "vault.gemspec" }}
v1-dependencies-bundler-
path: vendor/bundle
- name: Install vault
run: |-
curl -sLo vault.zip https://releases.hashicorp.com/vault/${{ matrix.vault-version }}/vault_${{ matrix.vault-version }}_linux_amd64.zip
unzip vault.zip
mkdir -p ~/bin
mv vault ~/bin
export PATH="~/bin:$PATH"
- name: Run tests
run: |-
export VAULT_VERSION=${{ matrix.vault-version }}
ruby --version
gem install bundler
bundle -v
bundle install --jobs=3 --retry=3 --path=vendor/bundle
bundle exec rake
build-release:
if: # GitHub does not currently support regular expressions inside if conditions
# (github.ref == 'refs/tags//^v[0-9]+\.[0-9]+\.[0-9]+.*/') && (github.ref != 'refs/heads//.*/')
defaults:
run:
working-directory: "~/repo"
runs-on: ubuntu-latest
needs:
- test
steps:
# # This item has no matching transformer
# - zfhui_ruby_gem_build:
# # This item has no matching transformer
# - zfhui_ruby_gem_release:

0 comments on commit 156a350

Please sign in to comment.