Skip to content

Commit ef87034

Browse files
authored
Add Ruby 3.2 and Windows CI tests (#55)
* Tests for ruby 3.2 * Tests for Windows * Remove Gemfile.lock * Add rubocop.yml
1 parent af9f07c commit ef87034

File tree

5 files changed

+73
-99
lines changed

5 files changed

+73
-99
lines changed

.circleci/config.yml

+48-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
version: 2.1
2+
23
orbs:
3-
ruby: circleci/[email protected]
4+
ruby: circleci/[email protected]
5+
win: circleci/[email protected]
6+
7+
commands:
8+
install_windows_requirements:
9+
description: "Install windows requirements"
10+
steps:
11+
- run:
12+
name: "Install MSYS2"
13+
command: choco install msys2 -y
14+
- run:
15+
name: "Install Ruby devkit"
16+
command: ridk install 2 3
17+
bundle-install:
18+
description: "Install dependencies"
19+
steps:
20+
- run:
21+
name: Which bundler?
22+
command: ruby -v; bundle -v
23+
- run:
24+
name: Bundle install
25+
command: bundle install
26+
427
jobs:
528
test:
629
parameters:
@@ -10,7 +33,22 @@ jobs:
1033
- image: cimg/ruby:<< parameters.ruby-version >>
1134
steps:
1235
- checkout
13-
- ruby/install-deps
36+
- bundle-install
37+
- run:
38+
name: Run tests
39+
command: bundle exec rake test
40+
win_test:
41+
executor:
42+
name: win/default
43+
shell: powershell.exe
44+
steps:
45+
- install_windows_requirements
46+
- run:
47+
name: "Install bundler"
48+
shell: powershell.exe
49+
command: gem install bundler
50+
- checkout
51+
- bundle-install
1452
- run:
1553
name: Run tests
1654
command: bundle exec rake test
@@ -29,23 +67,29 @@ jobs:
2967
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}\n" > $HOME/.gem/credentials
3068
gem build *.gemspec
3169
gem push *.gem
70+
3271
workflows:
3372
version: 2
3473
test:
3574
jobs:
3675
- test:
3776
matrix:
3877
parameters:
39-
ruby-version: [ "2.4", "2.5", "2.6", "2.7", "3.0", "3.1" ]
78+
ruby-version: [ "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2" ]
79+
filters:
80+
tags:
81+
only: /v[0-9]+(\.[0-9]+)*/
82+
- win_test:
4083
filters:
4184
tags:
4285
only: /v[0-9]+(\.[0-9]+)*/
4386
- publish:
4487
context: rubygems
4588
requires:
4689
- test
90+
- win_test
4791
filters:
4892
branches:
4993
ignore: /.*/
5094
tags:
51-
only: /v[0-9]+(\.[0-9]+)*/
95+
only: /v[0-9]+(\.[0-9]+)*/

.github/workflows/test.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on: [push, pull_request]
3+
jobs:
4+
Test:
5+
strategy:
6+
fail-fast: false
7+
matrix:
8+
os: [ 'windows-latest' ]
9+
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
10+
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Ruby
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: ${{ matrix.ruby }}
18+
bundler-cache: true
19+
- name: Test
20+
run: bundle exec rake test

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
pkg/*
22
.idea
3+
.bundle/
4+
vendor/
5+
Gemfile.lock

.rubocop.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Metrics:
2+
Enabled: false

Gemfile.lock

-95
This file was deleted.

0 commit comments

Comments
 (0)