-
Notifications
You must be signed in to change notification settings - Fork 265
164 lines (144 loc) · 4.7 KB
/
test.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: CI
on: [push, pull_request, workflow_dispatch]
env:
BUNDLE_JOBS: 4
# jobs defined in the order we want them listed in the Actions UI
jobs:
profile:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: [2.7]
idna_mode: [native, pure]
os: [ubuntu-20.04]
env:
IDNA_MODE: ${{ matrix.idna_mode }}
steps:
- uses: actions/checkout@v3
- name: Install libidn
run: sudo apt-get install libidn11-dev
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: false
ruby-version: ${{ matrix.ruby }}
- name: Install gems
run: bundle install
- name: >-
Profile Memory Allocation with ${{ matrix.idna_mode }} IDNA during Addressable::URI#parse
run: bundle exec rake profile:memory
- name: >-
Profile Memory Allocation with ${{ matrix.idna_mode }} IDNA during Addressable::Template#match
run: bundle exec rake profile:template_match_memory
coverage:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: [2.7]
os: [ubuntu-20.04]
env:
BUNDLE_WITHOUT: development
COVERALLS_SERVICE_NAME: github
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_DEBUG: true
CI_BUILD_NUMBER: ${{ github.run_id }}
steps:
- uses: actions/checkout@v3
- name: Install libidn
run: sudo apt-get install libidn11-dev
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: false
ruby-version: ${{ matrix.ruby }}
- name: Install gems
run: bundle install
- name: Run specs and report coverage
run: bundle exec rake
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# the job name is composed by these attributes
ruby:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
# quotes because of YAML gotcha: https://github.com/actions/runner/issues/849
- '3.0'
- 3.1
- 3.2
- jruby-9.1
- jruby-9.2
- jruby-9.3
- jruby-9.4
- truffleruby-22.1
- truffleruby-22.2
- truffleruby-22.3
os:
- ubuntu-20.04
gemfile:
- Gemfile
include:
- { os: ubuntu-20.04, ruby: 2.7, gemfile: gemfiles/public_suffix_2.rb }
- { os: ubuntu-20.04, ruby: 2.7, gemfile: gemfiles/public_suffix_3.rb }
- { os: ubuntu-20.04, ruby: 2.7, gemfile: gemfiles/public_suffix_4.rb }
# Ubuntu
- { os: ubuntu-22.04, ruby: 3.1 }
# macOS
- { os: macos-11, ruby: 3.1 }
- { os: macos-12, ruby: 3.1 }
# Windows
- { os: windows-2019, ruby: 3.1 }
- { os: windows-2022, ruby: 3.1 }
- { os: windows-2022, ruby: jruby-9.3 }
# allowed to fail
- { os: ubuntu-20.04, ruby: head, gemfile: Gemfile, allow-failure: true }
- { os: ubuntu-20.04, ruby: jruby-head, gemfile: Gemfile, allow-failure: true }
- { os: ubuntu-20.04, ruby: truffleruby-head, gemfile: Gemfile, allow-failure: true }
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
BUNDLE_WITHOUT: development:coverage
# Workaround for Windows JRuby JDK issue
# https://github.com/ruby/setup-ruby/issues/339
# https://github.com/jruby/jruby/issues/7182#issuecomment-1112953015
JAVA_OPTS: -Djdk.io.File.enableADS=true
steps:
- uses: actions/checkout@v3
- name: Install libidn (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install libidn11-dev
- name: Install libidn (macOS)
if: startsWith(matrix.os, 'macos')
run: brew install libidn
- name: Setup ruby
continue-on-error: ${{ matrix.allow-failure || false }}
id: setupruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: false
ruby-version: ${{ matrix.ruby }}
- name: Install gems
continue-on-error: ${{ matrix.allow-failure || false }}
id: bundle
run: bundle install
- name: Run specs
continue-on-error: ${{ matrix.allow-failure || false }}
id: specs
run: bundle exec rake spec
# because continue-on-error marks the steps as pass if they fail
- name: >-
Setup ruby outcome: ${{ steps.setupruby.outcome }}
run: echo NOOP
- name: >-
Install gems outcome: ${{ steps.bundle.outcome }}
run: echo NOOP
- name: >-
Run specs outcome: ${{ steps.specs.outcome }}
run: echo NOOP