From 138ac58db60b2548eb39e9df38c92b53ec478c59 Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Sat, 24 Jun 2023 07:36:33 +0000 Subject: [PATCH] Avoid to use bundle-install --with and --binstubs options on CI Use either BUNDLE_WITH variable or bundle config set. --binstubs is not required on CI environment. Signed-off-by: Takuya Noguchi --- .github/workflows/test-package.yml | 6 ++++-- dockerfiles/Dockerfile.jruby-unit-tests | 3 ++- dockerfiles/Dockerfile.ruby-unit-tests | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 440b8465c..b90e2ce6c 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -20,6 +20,8 @@ jobs: optional-groups: 'test' - ruby-version: 'jruby' optional-groups: 'test' + env: + BUNDLE_WITH: ${{ matrix.optional-groups }} steps: - uses: actions/checkout@v3 @@ -29,9 +31,9 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} - - run: bundle install --with "${{ matrix.optional-groups }}" --binstubs + - run: bundle install - - run: ./bin/rake spec + - run: bundle exec rake spec linting: runs-on: ubuntu-latest diff --git a/dockerfiles/Dockerfile.jruby-unit-tests b/dockerfiles/Dockerfile.jruby-unit-tests index 6a44479d9..6cec773f7 100644 --- a/dockerfiles/Dockerfile.jruby-unit-tests +++ b/dockerfiles/Dockerfile.jruby-unit-tests @@ -8,6 +8,7 @@ COPY . . ARG BUNDLE_VERSION ARG GEMSETS RUN gem install bundler -v $BUNDLE_VERSION -RUN bundle _${BUNDLE_VERSION}_ install --with "$GEMSETS" --binstubs +RUN bundle _${BUNDLE_VERSION}_ config set with "$GEMSETS" +RUN bundle _${BUNDLE_VERSION}_ install CMD ["bundle", "exec", "./bin/rake", "spec"] diff --git a/dockerfiles/Dockerfile.ruby-unit-tests b/dockerfiles/Dockerfile.ruby-unit-tests index 2b439a93d..9f9be88b9 100644 --- a/dockerfiles/Dockerfile.ruby-unit-tests +++ b/dockerfiles/Dockerfile.ruby-unit-tests @@ -7,6 +7,7 @@ COPY . . ARG BUNDLE_VERSION ARG GEMSETS RUN gem install bundler -v ${BUNDLE_VERSION} -RUN bundle _${BUNDLE_VERSION}_ install --with "$GEMSETS" --binstubs +RUN bundle _${BUNDLE_VERSION}_ config set with "$GEMSETS" +RUN bundle _${BUNDLE_VERSION}_ install CMD ["bundle", "exec", "./bin/rake", "spec"]