From b862fa3db22bb8e94ee4a5fd534353d900719d74 Mon Sep 17 00:00:00 2001 From: Ilya Bylich Date: Wed, 2 Sep 2020 15:37:58 +0300 Subject: [PATCH] Configure GitHub Actions (based on #733) --- .github/workflows/test.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..bb7c0a748 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,49 @@ +name: Parser Tests + +on: + push: + branches: + - master + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + env: + BUNDLE_JOBS: 4 + BUNDLE_RETRY: 3 + CI: true + TRUFFLERUBYOPT: "--engine.Mode=latency" + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + ruby: ["2.4.10", "2.5.8", "2.6.6", "2.7.1", "jruby-9.2", "truffleruby"] + test_command: ["bundle exec rake test", "./ci/run_rubocop_specs"] + experimental: [false] + include: + - ruby: "head" + experimental: true + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: /home/runner/bundle + key: bundle-${{ matrix.ruby }}-${{ hashFiles('../Gemfile') }}-${{ hashFiles('**/*.gemspec') }} + restore-keys: | + bundle-${{ matrix.ruby }}- + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Install Ragel + run: | + sudo apt-get update + sudo apt-get install ragel + - name: Bundle install + run: | + bundle config path /home/runner/bundle + bundle install + bundle update + - name: Run tests + run: | + bundle exec rake test