Parallelize GitHub Action jobs in CI #532
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref_name != 'master' }} | |
jobs: | |
tests_fast: | |
name: Fast tests | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-13 | |
runs-on: ${{ matrix.os }} | |
# timeout-minutes: 12 | |
env: | |
TERM: ansi | |
RVM_SKIP_BREW_UPDATE: true | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./install | |
- run: source ~/.rvm/scripts/rvm && rvm use 2.7.7 --install --default | |
- run: source ~/.rvm/scripts/rvm && gem install tf -v '>=0.4.1' | |
# For some reason, after running these tests, `source ~/.rvm/scripts/rvm` fails on macOS, so run them last. | |
# See https://github.com/rvm/rvm/pull/5387#issuecomment-2009391015 | |
# These tests also change the default ruby, which is another reason to run them last. | |
- name: tests/fast/* | |
run: source ~/.rvm/scripts/rvm && tf --text tests/fast/* | |
tests_long__named_ruby_and_gemsets_comment: | |
name: Named Ruby and gemsets comment test | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
env: | |
TERM: ansi | |
RVM_SKIP_BREW_UPDATE: true | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./install | |
- run: source ~/.rvm/scripts/rvm && rvm use 2.7.7 --install --default | |
- run: source ~/.rvm/scripts/rvm && gem install tf -v '>=0.4.1' | |
- name: named_ruby_and_gemsets_comment_test | |
run: source ~/.rvm/scripts/rvm && tf --text tests/long/named_ruby_and_gemsets_comment_test.sh | |
tests_long__ruby_prepare_mount_comment: | |
name: Ruby prepare mount comment test | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
env: | |
TERM: ansi | |
RVM_SKIP_BREW_UPDATE: true | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./install | |
- run: source ~/.rvm/scripts/rvm && rvm use 2.7.7 --install --default | |
- run: source ~/.rvm/scripts/rvm && gem install tf -v '>=0.4.1' | |
- name: ruby_prepare_mount_comment_test | |
run: source ~/.rvm/scripts/rvm && tf --text tests/long/ruby_prepare_mount_comment_test.sh | |
tests_long__truffleruby_comment: | |
name: TruffleRuby comment test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
env: | |
TERM: ansi | |
RVM_SKIP_BREW_UPDATE: true | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./install | |
- run: source ~/.rvm/scripts/rvm && rvm use 2.7.7 --install --default | |
- run: source ~/.rvm/scripts/rvm && gem install tf -v '>=0.4.1' | |
- name: truffleruby_comment_test | |
run: source ~/.rvm/scripts/rvm && tf --text tests/long/truffleruby_comment_test.sh |