Skip to content

Commit 1a6ec89

Browse files
committed
Improve GithubActions settings
1 parent d77e382 commit 1a6ec89

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

.github/workflows/ci.yml

+7-17
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
rspec:
1616
runs-on: ubuntu-latest
1717

18-
env:
18+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
19+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile
1920
ORACLE_COOKIE: sqldev
2021
ORACLE_FILE: oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
2122
ORACLE_HOME: /u01/app/oracle/product/11.2.0/xe
@@ -76,14 +77,8 @@ jobs:
7677
- name: Checkout
7778
uses: actions/checkout@v4
7879

79-
- name: Setup Ruby
80-
uses: ruby/setup-ruby@v1
81-
with:
82-
ruby-version: ${{ matrix.ruby }}
83-
8480
- name: Set DB Adapter
8581
env:
86-
RAILS_VERSION: ${{ matrix.rails }}
8782
DB_ADAPTER: ${{ matrix.adapter }}
8883
CUSTOM_ORACLE_FILE: ${{ secrets.CUSTOM_ORACLE_FILE }}
8984

@@ -100,23 +95,18 @@ jobs:
10095
sudo ln -s ${ORACLE_HOME}/lib/libnnz11.so /usr/lib/libnnz11.so
10196
fi
10297
103-
- name: Bundle
98+
- name: Setup Ruby
99+
uses: ruby/setup-ruby@v1
100+
with:
101+
ruby-version: ${{ matrix.ruby }}
102+
bundler-cache: true
104103
env:
105-
RUBY_VERSION: ${{ matrix.ruby }}
106-
RAILS_VERSION: ${{ matrix.rails }}
107104
DB_ADAPTER: ${{ matrix.adapter }}
108-
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
109-
run: |
110-
gem install bundler
111-
bundle config path vendor/bundle
112-
bundle install --jobs 4 --retry 3
113105

114106
- name: RSpec & publish code coverage
115107
uses: paambaati/[email protected]
116108
env:
117-
RAILS_VERSION: ${{ matrix.rails }}
118109
DB_ADAPTER: ${{ matrix.adapter }}
119-
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
120110
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
121111
with:
122112
coverageCommand: bin/rake

0 commit comments

Comments
 (0)