Skip to content

[install_xcode_plugin] hardening sh() to properly handle repo URL #98

[install_xcode_plugin] hardening sh() to properly handle repo URL

[install_xcode_plugin] hardening sh() to properly handle repo URL #98

Workflow file for this run

name: Module Test
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
module_tests:
name: Module tests (Ruby ${{ matrix.ruby }} on ${{ matrix.os }})
env:
GEM_HOME: ${{ github.workspace }}/sandbox_gems
GEM_PATH: ${{ github.workspace }}/sandbox_gems
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ruby: ['3.3', '3.4']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Build gem
id: build
shell: bash
run: |
GEM_FILE=$(gem build fastlane.gemspec | grep "File:" | awk '{print $2}')
echo "gem_file=$GEM_FILE" >> $GITHUB_OUTPUT
- name: Install gem in isolated GEM_HOME
shell: bash
run: gem install --no-document --env-shebang "${{ steps.build.outputs.gem_file }}"
- name: Run module tests against built gem
shell: bash
run: ./.github/scripts/run_module_tests.sh
- name: Sanity check fastlane CLI
shell: bash
run: |
set -euo pipefail
export PATH="$GEM_HOME/bin:$PATH"
# Determine installed fastlane version from the gem
FASTLANE_VERSION=$(ruby -e "require 'fastlane'; puts Fastlane::VERSION")
echo "Detected fastlane version: ${FASTLANE_VERSION}"
# Check version output
VERSION_OUTPUT=$(fastlane --version)
echo "fastlane --version => ${VERSION_OUTPUT}"
if [[ "${VERSION_OUTPUT}" != *"fastlane ${FASTLANE_VERSION}"* ]]; then
echo "Expected 'fastlane ${FASTLANE_VERSION}' in version output" >&2
exit 1
fi
# Run basic command
fastlane actions