-
-
Notifications
You must be signed in to change notification settings - Fork 329
140 lines (135 loc) · 4.52 KB
/
build.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
name: build
on:
push:
branches:
- master
- '*-stable'
- '*/ci-check'
pull_request: {}
permissions:
contents: read
jobs:
rake:
name: ${{ matrix.combo.name || matrix.combo.ruby }}
env:
DEFAULT_RUBY: '3.3'
strategy:
fail-fast: false
matrix:
combo:
- name: mspec-nodejs
command: bin/rake mspec_nodejs
- name: mspec-chrome
command: bin/rake mspec_chrome
- name: mspec-firefox
firefox: '106.0.4'
command: xvfb-run bin/rake mspec_firefox
- name: mspec-bun
bun: true
command: bin/rake mspec_bun
- name: minitest
command: bin/rake minitest
- name: minitest-strict-mode
command: bin/rake minitest
strict: 'true'
# - name: head-ruby
# ruby: head
# permissive: true
- name: current-ruby
ruby: '3.3'
- name: previous-ruby
ruby: '3.2'
- name: older-ruby
ruby: '3.1'
- name: near-eol-ruby
ruby: '3.0'
- name: smoke-test
command: bin/rake smoke_test
- name: windows-mspec-nodejs
command: bundle exec rake mspec_nodejs
os: windows-latest
- name: windows-mspec-chrome
command: bundle exec rake mspec_chrome
os: windows-latest
# - name: windows-mspec-firefox
# firefox: '106.0.4'
# command: bundle exec rake mspec_firefox
# os: windows-latest
- name: macos-mspec-safari
command: bundle exec rake mspec_safari
os: 'macos-latest'
- name: windows-minitest
command: bundle exec rake minitest
os: windows-latest
- name: windows
command: bundle exec rake rspec
os: windows-latest
- name: macos
command: bundle exec rake rspec
os: 'macos-latest'
- name: lint
command: bin/rake lint
- name: timezone
command: bin/rake mspec_nodejs TZ="Pacific/Fiji"
- name: performance
bun: true
permissive: true
fetchdepth: '0'
command: bin/rake performance:compare
# os: ryzen
# Currently failing:
# - ruby: truffleruby
# - ruby: jruby
runs-on: ${{ matrix.combo.os || 'ubuntu-latest' }}
continue-on-error: ${{ matrix.combo.permissive || false }}
steps:
- if: ${{ matrix.combo.bun }}
uses: oven-sh/setup-bun@v1
- if: ${{ matrix.combo.firefox }}
id: setup-firefox
uses: browser-actions/setup-firefox@latest
with:
firefox-version: ${{ matrix.combo.firefox }}
- uses: actions/checkout@v4
with:
fetch-depth: ${{ fromJSON(matrix.combo.fetchdepth || '1') }}
- if: ${{ matrix.combo.os != 'ryzen' }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.combo.ruby || env.DEFAULT_RUBY }}
bundler-cache: false
- run: ruby bin/git-submodule-fast-install
- run: bundle lock
- uses: actions/cache@v3
env:
KEY_PREFIX: ${{ runner.os }}-${{ matrix.combo.ruby || env.DEFAULT_RUBY }}
with:
path: ./vendor/bundle
key: ${{ env.KEY_PREFIX }}-gem-${{ github.ref }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ env.KEY_PREFIX }}-gem-${{ github.ref }}
${{ env.KEY_PREFIX }}-gem-master
${{ env.KEY_PREFIX }}-gem-
- uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-npm-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-npm-${{ github.ref }}
${{ runner.os }}-npm-master
${{ runner.os }}-npm-
- run: yarn install
- name: bundle install
run: |
bundle config path $PWD/vendor/bundle
bundle install --jobs 4 --retry 3
bundle clean
- name: set environment variables USE_STRICT
if: ${{ matrix.combo.strict == 'true' }}
run: |
echo "USE_STRICT=true" >> $GITHUB_ENV
- name: set environment variables MOZILLA_FIREFOX_BINARY
if: ${{ matrix.combo.firefox }}
run: |
echo "MOZILLA_FIREFOX_BINARY=${{ steps.setup-firefox.outputs.firefox-path }}" >> $GITHUB_ENV
- run: ${{ matrix.combo.command || 'bin/rake rspec' }}