From cbef318638457a470cc7c21f957b9e2b6a33116a Mon Sep 17 00:00:00 2001 From: onevcat Date: Wed, 18 Sep 2024 21:49:39 +0900 Subject: [PATCH] To save some CI resources --- .github/workflows/build.yaml | 6 ++---- .github/workflows/test.yaml | 29 +++++++++++++++++++++++++++++ fastlane/Fastfile | 4 ++++ 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 68f863e1d..944940af5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,15 +17,13 @@ jobs: xcode: [ '15.2', '15.3', - '15.4', - '16.0', ] steps: - uses: actions/checkout@v4 - name: Install Gems run: bundle install - - name: Run tests + - name: Build framework env: DESTINATION: platform=${{ matrix.destination }} XCODE_VERSION: ${{ matrix.xcode }} - run: bundle exec fastlane test_ci + run: bundle exec fastlane build_ci diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..aec245845 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,29 @@ +name: test + +on: [push, pull_request] + +jobs: + run-test: + runs-on: self-hosted + continue-on-error: true + strategy: + matrix: + destination: [ + 'macOS', + 'iOS Simulator,name=iPhone 15', + 'tvOS Simulator,name=Apple TV', + 'watchOS Simulator,name=Apple Watch Series 9 (41mm)' + ] + xcode: [ + '15.4', + '16.0', + ] + steps: + - uses: actions/checkout@v4 + - name: Install Gems + run: bundle install + - name: Run tests + env: + DESTINATION: platform=${{ matrix.destination }} + XCODE_VERSION: ${{ matrix.xcode }} + run: bundle exec fastlane test_ci diff --git a/fastlane/Fastfile b/fastlane/Fastfile index cb287f278..e3ef26c2e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,6 +20,10 @@ platform :ios do end end + lane :build_ci do + build(destination: ENV["DESTINATION"]) + end + lane :test do |options| scan( scheme: "Kingfisher",