Repository navigation
47 lines (44 loc) · 2.02 KB
/
Copy pathrelease-integration.yml
File metadata and controls
47 lines (44 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Release Integration
on:
pull_request:
permissions:
contents: read
jobs:
consumer:
runs-on: ubuntu-latest
name: Integration - ${{ matrix.entry.suite }} (Ruby ${{ matrix.entry.ruby }})
strategy:
matrix:
entry:
- { ruby: '3.3', suite: composite }
- { ruby: '3.3', suite: workflow }
- { ruby: '3.3', suite: consumer }
- { ruby: '4.0', suite: composite }
- { ruby: '4.0', suite: workflow }
- { ruby: '4.0', suite: consumer }
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # v1.343.0
with:
ruby-version: ${{ matrix.entry.ruby }}
bundler-cache: true
- name: Build and Install Release Gem
run: |
bundle exec rake build
version=$(ruby -Ilib -rruby-gem-release/version -e 'print RubyGemRelease::VERSION')
gem install "pkg/ruby-gem-release-$version.gem" --install-dir "$RUNNER_TEMP/gems" --ignore-dependencies --no-document
printf "source 'https://rubygems.org'\ngem 'ruby-gem-release', '= %s'\ngem 'commonmarker', '~> 2.10'\n" "$version" > "$RUNNER_TEMP/Gemfile"
gem_path="$RUNNER_TEMP/gems:$(bundle exec ruby -e 'print Bundler.bundle_path'):$(ruby -e 'print Gem.path.join(File::PATH_SEPARATOR)')"
BUNDLE_GEMFILE="$RUNNER_TEMP/Gemfile" GEM_HOME="$RUNNER_TEMP/gems" GEM_PATH="$gem_path" bundle lock --local
{
echo "RELEASE_CONSUMER_GEMFILE=$RUNNER_TEMP/Gemfile"
echo "RELEASE_CONSUMER_GEM_HOME=$RUNNER_TEMP/gems"
echo "RELEASE_CONSUMER_GEM_PATH=$gem_path"
echo "RELEASE_CONSUMER_LIB=$RUNNER_TEMP/gems/gems/ruby-gem-release-$version/lib"
} >> "$GITHUB_ENV"
- name: Exercise Installed Release Lifecycle
run: bundle exec rake spec:integration
env:
SPEC: spec/integration/${{ matrix.entry.suite }}/**/*_spec.rb