Skip to content

fix(README): Use GH actions Test Badge #57

fix(README): Use GH actions Test Badge

fix(README): Use GH actions Test Badge #57

name: "Extension Generator"
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: dummy-app-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
install_dummy_app:
name: Dummy App
runs-on: ubuntu-24.04
env:
RUBY_VERSION: "3.2"
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
rubygems: "latest"
- name: "Test `rake extension:test_app`"
run: |
rm -rf $RUNNER_TEMP/dummy_extension # cleanup previous runs
mkdir -p $RUNNER_TEMP/dummy_extension
cd $RUNNER_TEMP/dummy_extension
bundle init
bundle add rails -v "< 8.1" --skip-install
bundle add sqlite3 -v "~> 2.0" --skip-install
test -n "${{ inputs.extra_gems }}" && bundle add ${{ inputs.extra_gems }} --skip-install
bundle add solidus --path "$(ruby -e"puts File.expand_path ENV['GITHUB_WORKSPACE']")"
export LIB_NAME=set # dummy requireable file
bundle exec rake -rrails -rspree/testing_support/extension_rake -e'Rake::Task["extension:test_app"].invoke'
- name: "Ensure extension test app is created"
run: |
test -d ${{ runner.temp }}/dummy_extension/spec/dummy