Skip to content

Merge pull request #7 from appraisal-rb/feat/license #25

Merge pull request #7 from appraisal-rb/feat/license

Merge pull request #7 from appraisal-rb/feat/license #25

Workflow file for this run

name: CI
permissions:
contents: read
pull-requests: write
id-token: write
on:
push:
branches:
- 'main'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
# Test the action itself across platforms and Ruby versions
test-action:
name: Action Test (${{ matrix.os }}, Ruby ${{ matrix.ruby }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
ruby: ['3.2', '3.3', '3.4']
steps:
- uses: actions/checkout@v5
- name: Run setup-ruby-flash action
uses: ./
with:
ruby-version: ${{ matrix.ruby }}
cache-version: 'v2'
- name: Verify Ruby installation
run: |
echo "==> Ruby version:"
ruby --version
echo "==> Gem version:"
gem --version
echo "==> Ruby location:"
which ruby
echo "==> rv version:"
rv --version
# Test the action with ore gem installation
test-action-with-ore:
name: Action + Ore Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v5
- name: Create test Gemfile
run: |
cat > Gemfile << 'EOF'
source 'https://gem.coop'
gem 'rake'
EOF
- name: Run setup-ruby-flash with ore
uses: ./
with:
ruby-version: '3.4'
ore-install: true
cache-version: 'v2'
- name: Verify ore installation
run: |
echo "==> ore version:"
ore --version
echo "==> Installed gems:"
ore list
echo "==> ore check:"
ore check
# Run acceptance tests (after action installs Ruby)
acceptance-tests:
name: Acceptance Tests (Ruby ${{ matrix.ruby }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.2', '3.3', '3.4']
steps:
- uses: actions/checkout@v5
- name: Run setup-ruby-flash action
uses: ./
with:
ruby-version: ${{ matrix.ruby }}
ore-install: true
cache-version: 'v2'
- name: Run acceptance tests
env:
EXPECTED_RUBY_VERSION: ${{ matrix.ruby }}
run: bundle exec rspec spec/acceptance/
# Lint the Ruby code (acceptance tests, Rakefile, etc.)
lint:
name: RuboCop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run setup-ruby-flash action
uses: ./
with:
ruby-version: '3.4'
ore-install: true
cache-version: 'v2'
- name: Run RuboCop
run: bundle exec rubocop