Skip to content

Commit ffdd8c6

Browse files
mishina2228sodabrewsimi
authored
Update GitHub Actions workflows (#1253)
* Update GitHub Actions from actions/checkout from v2 to v3 * Enable bundler-cache in ruby/setup-ruby * Pass `BUNDLE_WITHOUT: development` to skip gems for development Co-authored-by: Aaron Stone <[email protected]> Co-authored-by: Josef Šimánek <[email protected]>
1 parent 96f6102 commit ffdd8c6

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,20 @@ jobs:
4747
# On the fail-fast: true, it cancels all in-progress jobs
4848
# if any matrix job fails unlike Travis fast_finish.
4949
fail-fast: false
50+
env:
51+
BUNDLE_WITHOUT: development
5052
steps:
51-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
54+
- name: Install openssl
55+
if: matrix.os == 'macos-latest'
56+
run: |
57+
brew update
58+
brew install openssl
5259
# https://github.com/ruby/setup-ruby
5360
- uses: ruby/setup-ruby@v1
5461
with:
5562
ruby-version: ${{ matrix.ruby }}
56-
- name: Install openssl
57-
if: matrix.os == 'macos-latest'
58-
run: |
59-
brew update
60-
brew install openssl
61-
- run: ruby -v
62-
- run: bundle install --without development
63+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
6364
- if: matrix.db != ''
6465
run: echo 'DB=${{ matrix.db }}' >> $GITHUB_ENV
6566
- run: sudo echo "127.0.0.1 mysql2gem.example.com" | sudo tee -a /etc/hosts

.github/workflows/container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# if any matrix job fails unlike Travis fast_finish.
2222
fail-fast: false
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
- run: docker build -t mysql2 -f ci/Dockerfile_${{ matrix.distro }} --build-arg IMAGE=${{ matrix.image }} .
2626
# Add the "--cap-add=... --security-opt seccomp=..." options
2727
# as a temporary workaround to avoid the following issue

.github/workflows/rubocop.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,14 @@ on: [push, pull_request]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8-
8+
env:
9+
BUNDLE_WITHOUT: development
910
steps:
10-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1112
- name: Set up Ruby 2.4
1213
uses: ruby/setup-ruby@v1
1314
with:
1415
ruby-version: 2.4
15-
- name: Cache gems
16-
uses: actions/cache@v1
17-
with:
18-
path: vendor/bundle
19-
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
20-
restore-keys: |
21-
${{ runner.os }}-rubocop-
22-
- name: Install gems
23-
run: |
24-
bundle config path vendor/bundle
25-
bundle install --jobs 4 --retry 3
16+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
2617
- name: Run RuboCop
2718
run: bundle exec rubocop

0 commit comments

Comments
 (0)