Specify action hero versions #100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-18 | |
node: lts/hydrogen | |
command: bin/rake mspec_nodejs | |
- name: mspec-nodejs | |
node: latest | |
command: bin/rake mspec_nodejs | |
- name: mspec-chrome-115 | |
chrome: '115' | |
command: bin/rake mspec_chrome | |
- name: mspec-chrome | |
chrome: stable | |
command: bin/rake mspec_chrome | |
- name: mspec-firefox-115 | |
firefox: '115.16.1esr' | |
command: xvfb-run bin/rake mspec_firefox | |
- name: mspec-firefox | |
firefox: latest | |
command: xvfb-run bin/rake mspec_firefox | |
- name: mspec-bun | |
bun: '1.1.30' | |
command: bin/rake mspec_bun | |
- name: mspec-deno | |
deno: 'vx.x.x' | |
command: bin/rake mspec_deno | |
- name: minitest | |
chrome: '115' | |
node: '18.20.4' | |
command: bin/rake minitest | |
- name: minitest-strict-mode | |
chrome: stable | |
node: latest | |
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: jruby | |
ruby: jruby | |
# truffleruby: disabled, does not finish on github actions | |
# probably not enough memory | |
# - name: truffleruby | |
# ruby: 'truffleruby' | |
- name: smoke-test-nodejs-18 | |
node: '18.20.4' | |
command: bin/rake smoke_test | |
- name: smoke-test | |
node: latest | |
command: bin/rake smoke_test | |
- name: windows-mspec-nodejs | |
node: latest | |
command: bundle exec rake mspec_nodejs | |
os: windows-latest | |
- name: windows-mspec-chrome | |
chrome: stable | |
command: bundle exec rake mspec_chrome | |
os: windows-latest | |
- name: windows-mspec-edge | |
edge: stable | |
command: bundle exec rake mspec_chrome | |
os: windows-latest | |
- name: macos-mspec-safari | |
command: bundle exec rake mspec_safari | |
os: macos-latest | |
- name: macos-mspec-osascript | |
command: bundle exec rake mspec_osascript | |
os: macos-latest | |
- name: windows-minitest | |
chrome: stable | |
node: lts/hydrogen | |
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: '1.1.30' | |
node: latest | |
permissive: true | |
fetchdepth: '0' | |
command: bin/rake performance:compare | |
# os: ryzen | |
runs-on: ${{ matrix.combo.os || 'ubuntu-latest' }} | |
continue-on-error: ${{ matrix.combo.permissive || false }} | |
steps: | |
- if: ${{ matrix.combo.bun }} | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: ${{ matrix.combo.bun }} | |
- if: ${{ matrix.combo.deno }} | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: ${{ matrix.combo.deno }} | |
- if: ${{ matrix.combo.chrome }} | |
id: setup-chrome | |
uses: browser-actions/setup-chrome@v1 | |
with: | |
chrome-version: ${{ matrix.combo.chrome }} | |
- if: ${{ matrix.combo.edge }} | |
id: setup-edge | |
uses: browser-actions/setup-edge@v1 | |
with: | |
edge-version: ${{ matrix.combo.edge }} | |
- if: ${{ matrix.combo.firefox }} | |
id: setup-firefox | |
uses: browser-actions/setup-firefox@v1 | |
with: | |
firefox-version: ${{ matrix.combo.firefox }} | |
- if: ${{ matrix.combo.node}} | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.combo.node }} | |
- 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@v4 | |
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@v4 | |
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 GOOGLE_CHROME_BINARY | |
if: ${{ matrix.combo.chrome }} | |
run: | | |
echo "GOOGLE_CHROME_BINARY=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV | |
# steps.setup-edge.outputs.edge-path is not set when the specified version of Edge is already installed | |
# thats why the msedge.exe path is hardcoded below | |
- name: set environment variables GOOGLE_CHROME_BINARY | |
if: ${{ matrix.combo.edge }} | |
run: | | |
echo "GOOGLE_CHROME_BINARY='C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe'" >> $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' }} |