migrate from CircleCI to Github Actions #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
|
||
| env: | ||
| RUBYOPT: --disable-frozen-string-literal | ||
| MOCHA_GENERATE_DOCS: 1 | ||
| run: bundle exec rake docs docs:coverage | ||