Skip to content

Commit 24ee0db

Browse files
committed
migrate from CircleCI to Github Actions
1 parent cd05da1 commit 24ee0db

File tree

3 files changed

+80
-120
lines changed

3 files changed

+80
-120
lines changed

.circleci/config.yml

Lines changed: 0 additions & 119 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: "0 3 * * 0"
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
env:
12+
BUNDLE_GEMFILE: gemfiles/Gemfile.rubocop
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: ruby
18+
rubygems: latest
19+
bundler: latest
20+
bundler-cache: true
21+
- run: bundle exec rake lint
22+
23+
test:
24+
runs-on: ubuntu-latest
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
ruby:
29+
[
30+
"2.2",
31+
"2.3",
32+
"2.4",
33+
"2.5",
34+
"2.6",
35+
"2.7",
36+
"3.0",
37+
"3.1",
38+
"3.2",
39+
"3.3",
40+
"3.4",
41+
jruby-head,
42+
]
43+
include:
44+
- ruby: head
45+
- ruby: head
46+
gemfile: gemfiles/Gemfile.minitest.latest
47+
test_env: MOCHA_RUN_INTEGRATION_TESTS=minitest
48+
- ruby: head
49+
gemfile: gemfiles/Gemfile.test-unit.latest
50+
test_env: MOCHA_RUN_INTEGRATION_TESTS=test-unit
51+
52+
env:
53+
BUNDLE_GEMFILE: ${{ matrix.gemfile || 'Gemfile' }}
54+
RUBYOPT: ${{ matrix.ruby != '2.2' && '--enable-frozen-string-literal' || '' }}
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- uses: ruby/setup-ruby@v1
60+
with:
61+
ruby-version: ${{ matrix.ruby }}
62+
rubygems: latest
63+
bundler: latest
64+
bundler-cache: true
65+
66+
- name: Run tests
67+
shell: bash -e {0}
68+
run: ${{ matrix.test_env }} bundle exec rake test 2>&1 | tee >(grep -q "warning:" && exit 1)
69+
70+
- name: Performance tests
71+
if: matrix.ruby == 'head' && !matrix.gemfile
72+
run: bundle exec rake test:performance 2>&1 | tee >(grep -q "warning:" && exit 1)
73+
74+
- name: Generate docs
75+
if: matrix.ruby == 'head' && !matrix.gemfile
76+
env:
77+
RUBYOPT: --disable-frozen-string-literal
78+
MOCHA_GENERATE_DOCS: 1
79+
run: bundle exec rake docs docs:coverage

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require:
1+
plugin:
22
- rubocop-rake
33

44
inherit_from: .rubocop_todo.yml

0 commit comments

Comments
 (0)