Skip to content

Commit

Permalink
DEV: Update the CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
CvX committed Dec 3, 2021
1 parent 7c59d3c commit fdedbe5
Showing 1 changed file with 11 additions and 24 deletions.
35 changes: 11 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Test Exporter

on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 0 * * 0' # weekly
Expand All @@ -12,38 +14,23 @@ jobs:
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby: ["3.0", "2.7", "2.6"]
ruby: ['3.0', '2.7', '2.6']

steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-ruby@v1

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-${{ matrix.ruby }}-gems-v2-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ruby }}-gems-v2-
bundler-cache: true

- name: Downgrade rubygems
run: |
# for Ruby <= 2.6 , details https://github.com/rubygems/rubygems/issues/3284
gem update --system 3.0.8
if: ${{ matrix.ruby == '2.6' || matrix.ruby == '2.7' }}
- name: Upgrade rubygems
run: |
gem update --system
- name: Setup gems
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4
bundle exec appraisal install
- name: Rubocop
run: bundle exec rubocop
- name: install gems

- name: Install gems
run: bundle exec appraisal bundle

- name: Run tests
run: bundle exec appraisal rake

0 comments on commit fdedbe5

Please sign in to comment.