Skip to content

migrate from CircleCI to Github Actions #1

migrate from CircleCI to Github Actions

migrate from CircleCI to Github Actions #1

Workflow file for this run

name: CI
on:
push:
schedule:
- cron: "0 3 * * 0"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- run: bundle exec rake lint
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.rubocop
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
[
"2.2",
"2.3",
"2.4",
"2.5",
"2.6",
"2.7",
"3.0",
"3.1",
"3.2",
"3.3",
"3.4",
ruby,
jruby,
]
include:
- ruby: ruby
gemfile: gemfiles/Gemfile.minitest.latest
test_env: MOCHA_RUN_INTEGRATION_TESTS=minitest
- ruby: ruby
gemfile: gemfiles/Gemfile.test-unit.latest
test_env: MOCHA_RUN_INTEGRATION_TESTS=test-unit
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile || 'Gemfile' }}
RUBYOPT: ${{ matrix.ruby != '2.2' && '--enable-frozen-string-literal' || '' }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
shell: bash -e {0}
run: ${{ matrix.test_env }} bundle exec rake test 2>&1 | tee >(grep -q "warning:" && exit 1)
- name: Performance tests
if: matrix.ruby == 'ruby' && !matrix.gemfile
run: bundle exec rake test:performance 2>&1 | tee >(grep -q "warning:" && exit 1)
- name: Generate docs
if: matrix.ruby == 'ruby&& !matrix.gemfile

Check failure on line 71 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 71, Col: 13): Unexpected symbol: ''ruby&& !matrix.gemfile'. Located at position 16 within expression: matrix.ruby == 'ruby&& !matrix.gemfile
env:
RUBYOPT: --disable-frozen-string-literal
MOCHA_GENERATE_DOCS: 1
run: bundle exec rake docs docs:coverage