diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..47e87f3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,38 @@ +--- +name: Continuous Integration + +on: + push: + branches: + - main + - master + - ".*-stable" + pull_request: + branches: + - main + - master + - ".*-stable" + +jobs: + ci: + if: "!contains(github.event.commits[0].message, '[ci skip]')" + name: 'Ruby ${{ matrix.ruby_version }} ${{ matrix.os }}' + runs-on: '${{ matrix.os }}' + strategy: + fail-fast: false + matrix: + ruby_version: + - '2.7' + - '3.0' + - '3.1' + - '3.2' + os: + - ubuntu-latest + - windows-latest + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby_version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: script/cibuild diff --git a/script/cibuild b/script/cibuild new file mode 100755 index 0000000..de9fef6 --- /dev/null +++ b/script/cibuild @@ -0,0 +1,2 @@ +#!/bin/bash +bundle exec rubocop