Skip to content
Permalink
Browse files

Improve Github Actions configuration (#150)

* Improve Github Actions configuration

* Apply suggestions from code review

Co-Authored-By: Hans Lemuet <Spone@users.noreply.github.com>
  • Loading branch information
nicolas-brousse and Spone committed Nov 28, 2019
1 parent 69b7247 commit a02e065003126d5c6b4894a8377e4bc8e2e7f668
Showing with 25 additions and 8 deletions.
  1. +25 −8 .github/workflows/test.yml
@@ -4,32 +4,49 @@ on: [push, pull_request]

jobs:
test:
name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}
name: Ruby ${{ matrix.versions.ruby }}, Rails ${{ matrix.versions.rails }}
runs-on: ubuntu-latest
strategy:
matrix:
node: [12]
ruby: ["2.5.x", "2.6.x"]
rails: ["5.0.x", "5.1.x", "5.2.x", "6.0.x"]
versions:
- { ruby: "2.5.x", rails: "5.0.x", node: "12" }
- { ruby: "2.6.x", rails: "5.0.x", node: "12" }
- { ruby: "2.5.x", rails: "5.1.x", node: "12" }
- { ruby: "2.6.x", rails: "5.1.x", node: "12" }
- { ruby: "2.5.x", rails: "5.2.x", node: "12" }
- { ruby: "2.6.x", rails: "5.2.x", node: "12" }
- { ruby: "2.5.x", rails: "6.0.x", node: "12" }
- { ruby: "2.6.x", rails: "6.0.x", node: "12" }

steps:
- uses: actions/checkout@v1

- uses: actions/cache@v1
id: cache
with:
path: gemfiles/vendor/bundle
key: ruby-${{ matrix.versions.ruby }}-rails-${{ matrix.versions.rails }}-node-${{ matrix.versions.node }}

- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
ruby-version: ${{ matrix.versions.ruby }}

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.versions.node }}

- name: Set up bundler
run: |
echo 'gem: --no-document' >> ~/.gemrc
gem install bundler
bundle config --global gemfile gemfiles/rails_${{ matrix.rails }}.gemfile
bundle install --jobs 4 --retry 3
bundle config --global gemfile gemfiles/rails_${{ matrix.versions.rails }}.gemfile
bundle config --global path vendor/bundle
- name: Install gems
run: |
bundle install --jobs $(nproc) --retry 3
- name: Set up yarn
run: |

0 comments on commit a02e065

Please sign in to comment.
You can’t perform that action at this time.