diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec3a7e1..cea83c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,18 +12,27 @@ jobs: steps: - uses: actions/checkout@master - - name: Sets up the Ruby version + - name: Set up the Ruby version uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - name: Sets up the environment + - name: Ruby gem cache + uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + + - name: Set up the environment run: | gem install bundler + bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: Runs tests - run: rspec + run: bundle exec rspec rubocop: runs-on: ubuntu-latest @@ -34,15 +43,24 @@ jobs: steps: - uses: actions/checkout@master - - name: Sets up the Ruby version + - name: Set up the Ruby version uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - name: Sets up the environment + - name: Ruby gem cache + uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + + - name: Set up the environment run: | gem install bundler + bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: Runs Rubocop - run: rubocop + run: bundle exec rubocop