From 0523e2d61e2f3c945628a2d63707287708fe449e Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sun, 6 Jun 2021 12:45:21 -0400 Subject: [PATCH] ci: create github actions pipeline --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..29ef838 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: ci +concurrency: + group: "${{github.workflow}}-${{github.ref}}" + cancel-in-progress: true +on: + workflow_dispatch: + push: + branches: + - main + - v*.*.x + tags: + - v*.*.* + pull_request: + types: [opened, synchronize] + branches: + - '*' + +jobs: + rubocop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.0" + bundler-cache: true + - run: bundle exec rake rubocop + + test: + needs: ["rubocop"] + strategy: + matrix: + ruby: ["2.5", "2.6", "2.7", "3.0", "head"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + - run: bundle exec rake test