Skip to content

[CHEF-12875] Updated the workflows after forking to chef #2

[CHEF-12875] Updated the workflows after forking to chef

[CHEF-12875] Updated the workflows after forking to chef #2

Workflow file for this run

---
name: unit_specs
"on":
pull_request:
push:
branches:
- main
concurrency:
group: unit-specs-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
name: Unit Test with Ruby
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["3.1", "3.3"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check for Gemfile
id: check
run: |
if [ -f Gemfile ]; then
echo "gemfile=true" >> $GITHUB_OUTPUT
else
echo "gemfile=false" >> $GITHUB_OUTPUT
fi
- name: Setup Ruby
if: steps.check.outputs.gemfile == 'true'
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Rake Test
if: steps.check.outputs.gemfile == 'true'
run: bundle exec rake test