From f199ba07152802d75e1873b98b419b6abbe16b13 Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Tue, 10 Jan 2023 14:39:06 -0500 Subject: [PATCH] Backport CI migration --- .github/probots.yml | 2 -- .github/workflows/cla.yml | 22 ++++++++++++++++++++++ .github/workflows/liquid.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 32 -------------------------------- 4 files changed, 49 insertions(+), 34 deletions(-) delete mode 100644 .github/probots.yml create mode 100644 .github/workflows/cla.yml create mode 100644 .github/workflows/liquid.yml delete mode 100644 .travis.yml diff --git a/.github/probots.yml b/.github/probots.yml deleted file mode 100644 index 1491d275..00000000 --- a/.github/probots.yml +++ /dev/null @@ -1,2 +0,0 @@ -enabled: - - cla diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml new file mode 100644 index 00000000..2c3a4042 --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,22 @@ +name: Contributor License Agreement (CLA) + +on: + pull_request_target: + types: [opened, synchronize] + issue_comment: + types: [created] + +jobs: + cla: + runs-on: ubuntu-latest + if: | + (github.event.issue.pull_request + && !github.event.issue.pull_request.merged_at + && contains(github.event.comment.body, 'signed') + ) + || (github.event.pull_request && !github.event.pull_request.merged) + steps: + - uses: Shopify/shopify-cla-action@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + cla-token: ${{ secrets.CLA_TOKEN }} diff --git a/.github/workflows/liquid.yml b/.github/workflows/liquid.yml new file mode 100644 index 00000000..899ba6bc --- /dev/null +++ b/.github/workflows/liquid.yml @@ -0,0 +1,27 @@ +name: Liquid +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + entry: + - { ruby: "2.7" } # minimum supported + - { ruby: "3.0", rubocop: true } # latest working with rubocop + - { ruby: "3.2" } # latest + name: test (${{ matrix.entry.ruby }}) + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.entry.ruby }} + - uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }} + restore-keys: ${{ runner.os }}-gems- + - run: bundle install --jobs=3 --retry=3 --path=vendor/bundle + - run: bundle exec rake test + - name: Run rubocop + if: matrix.entry.rubocop + run: bundle exec rubocop diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0e3e476d..00000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: ruby - -rvm: - - 2.1 - - 2.2 - - 2.3 - - 2.4 - - 2.5 - - ruby-head - - jruby-head -# - rbx-2 - -sudo: false - -addons: - apt: - packages: - - libgmp3-dev - -matrix: - allow_failures: - - rvm: ruby-head - - rvm: jruby-head - -install: - - gem install rainbow -v 2.2.1 - - bundle install - -script: bundle exec rake - -notifications: - disable: true