forked from fastlane/fastlane
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (55 loc) · 1.88 KB
/
module_test.yml
File metadata and controls
66 lines (55 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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