Skip to content

[DOC] Add .document #813

[DOC] Add .document

[DOC] Add .document #813

Workflow file for this run

name: test
on:
push:
pull_request:
schedule:
- cron: '25 10 * * *'
workflow_dispatch:
jobs:
ruby-versions:
if: ${{ startsWith(github.repository, 'ruby/') || github.event_name != 'schedule' }}
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
test:
needs: ruby-versions
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- ruby: jruby
- ruby: jruby-head
- ruby: truffleruby
- ruby: truffleruby-head
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global advice.detachedHead 0
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
- name: Experiment with a manual bundle install
run: bundle install
- name: Run test
run: rake # Attempting without 'bundle exec'
- name: Select the latest ruby release
id: latest
run: |
printenv versions | jq -r '[.[] | select(test("^[0-9]"))] | "version="+max' >> $GITHUB_OUTPUT
env:
versions: ${{needs.ruby-versions.outputs.versions}}
shell: sh
- id: build
run: |
rake build
echo "pkg=${GITHUB_REPOSITORY#*/}-${RUNNING_OS%-*}" >> $GITHUB_OUTPUT
env:
RUNNING_OS: ${{matrix.os}}
if: ${{matrix.ruby == steps.latest.outputs.version}}
shell: bash
- name: Upload package
uses: actions/upload-artifact@v3
with:
path: pkg/*.gem
name: ${{steps.build.outputs.pkg}}
if: steps.build.outputs.pkg