From 320369893abf0379dcb74858ebf061a2ffcaada0 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Fri, 4 Dec 2020 18:02:22 +0100 Subject: [PATCH] Use ruby/setup-ruby in workflow testing This action has built in caching the right way, which makes it easier. It also runs on push events because that gives a shared cache. There is no shared cache on PR testing for (valid) security reasons. --- .github/workflows/main.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e143bf50..bcbd099e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,8 @@ name: noop run -on: pull_request +on: + - pull_request + - push jobs: unit: @@ -9,19 +11,9 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup ruby - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 - - uses: actions/cache@v2 - with: - path: vendor/bundle - key: ${{ runner.os }}-2.7-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-2.7-gems- - - name: Install dependencies - run: | - gem install bundler - bundle config path vendor/bundle - bundle install --jobs $(nproc) --retry 3 + bundler-cache: true - name: Run msync --noop run: bundle exec msync update --noop --git-base=https://github.com/