-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.yml
95 lines (91 loc) · 2.21 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: 2.1
orbs:
ruby: circleci/[email protected]
win: circleci/[email protected]
commands:
install_windows_requirements:
description: "Install windows requirements"
steps:
- run:
name: "Install MSYS2"
command: choco install msys2 -y
- run:
name: "Install Ruby devkit"
command: ridk install 2 3
bundle-install:
description: "Install dependencies"
steps:
- run:
name: Which bundler?
command: ruby -v; bundle -v
- run:
name: Bundle install
command: bundle install
jobs:
test:
parameters:
ruby-version:
type: string
docker:
- image: cimg/ruby:<< parameters.ruby-version >>
steps:
- checkout
- bundle-install
- run:
name: Run tests
command: bundle exec rake test
win_test:
executor:
name: win/default
shell: powershell.exe
steps:
- install_windows_requirements
- run:
name: "Install bundler"
shell: powershell.exe
command: gem install bundler
- checkout
- bundle-install
- run:
name: Run tests
command: bundle exec rake test
publish:
docker:
- image: cimg/ruby:2.4
steps:
- checkout
- ruby/install-deps
- run:
name: Publish gem
command: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
workflows:
version: 2
test:
jobs:
- test:
matrix:
parameters:
ruby-version: [ "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4" ]
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*/
- win_test:
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*/
- publish:
context: rubygems
requires:
- test
- win_test
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*/