From 644a49c0fb83f17332af22c529bd85ca6d5b7232 Mon Sep 17 00:00:00 2001 From: Alexei Boronine Date: Tue, 17 Jun 2025 17:28:52 -0600 Subject: [PATCH 1/4] Convert from Travis CI to GitHub Actions - Add modern CI workflow and remove deprecated .travis.yml --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ .travis.yml | 4 ---- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c461ac5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +jobs: + test: + runs-on: macos-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Select Xcode version + run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer + + - name: Show Xcode version + run: xcodebuild -version + + - name: Run tests + run: | + xcodebuild \ + -scheme "hsluv-objc" \ + -destination "platform=macOS,arch=x86_64" \ + -enableCodeCoverage YES \ + CODE_SIGNING_REQUIRED=NO \ + test \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f963d2b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: objective-c -osx_image: xcode8.2 -script: - - xcodebuild -scheme "hsluv-objc" -destination "arch=x86_64" CODE_SIGNING_REQUIRED=NO test From 658a9c6c2e2fd544809d82dfae8f409bdad1c240 Mon Sep 17 00:00:00 2001 From: Alexei Boronine Date: Tue, 17 Jun 2025 17:30:20 -0600 Subject: [PATCH 2/4] Update workflow to use manual dispatch trigger --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c461ac5..eaf018e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,7 @@ name: CI on: push: - branches: [ master, main ] - pull_request: - branches: [ master, main ] + workflow_dispatch: jobs: test: From 3a1a2f059ebe8a2dabf34b14bd324f400002ab4c Mon Sep 17 00:00:00 2001 From: Alexei Boronine Date: Tue, 17 Jun 2025 17:35:58 -0600 Subject: [PATCH 3/4] Improve GitHub Actions workflow with multi-platform testing and enhanced reporting --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++++++----- README.md | 2 +- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaf018e..2597c0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,27 +2,52 @@ name: CI on: push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] workflow_dispatch: jobs: test: + strategy: + matrix: + destination: + - platform=macOS,arch=x86_64 + - platform=iOS Simulator,name=iPhone 15,OS=latest + runs-on: macos-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Select Xcode version - run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer - - name: Show Xcode version run: xcodebuild -version + - name: List available schemes + run: xcodebuild -list + - name: Run tests run: | xcodebuild \ -scheme "hsluv-objc" \ - -destination "platform=macOS,arch=x86_64" \ + -destination "${{ matrix.destination }}" \ -enableCodeCoverage YES \ + -derivedDataPath DerivedData \ CODE_SIGNING_REQUIRED=NO \ - test \ No newline at end of file + test + + - name: Generate test report + if: always() + run: | + xcrun xccov view --report --json DerivedData/Logs/Test/*.xcresult > coverage.json || true + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-${{ strategy.job-index }} + path: | + DerivedData/Logs/Test/ + coverage.json + retention-days: 30 \ No newline at end of file diff --git a/README.md b/README.md index ed75124..29d9810 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Cocoapod compatible](https://img.shields.io/cocoapods/v/hsluv-objc.svg)](https://cocoapods.org/pods/hsluv-objc) -[![Build Status](https://travis-ci.org/hsluv/hsluv-objc.svg?branch=master)](https://travis-ci.org/hsluv/hsluv-objc) +[![CI](https://github.com/hsluv/hsluv-objc/actions/workflows/ci.yml/badge.svg)](https://github.com/hsluv/hsluv-objc/actions/workflows/ci.yml) #hsluv-objc From c32d1cba874b152d1ebfcf3f4ecb27757bd5d929 Mon Sep 17 00:00:00 2001 From: Alexei Boronine Date: Tue, 17 Jun 2025 17:37:42 -0600 Subject: [PATCH 4/4] Revert ci.yml to simpler version --- .github/workflows/ci.yml | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2597c0c..eaf018e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,52 +2,27 @@ name: CI on: push: - branches: [ master, main ] - pull_request: - branches: [ master, main ] workflow_dispatch: jobs: test: - strategy: - matrix: - destination: - - platform=macOS,arch=x86_64 - - platform=iOS Simulator,name=iPhone 15,OS=latest - runs-on: macos-latest steps: - name: Checkout code uses: actions/checkout@v4 + - name: Select Xcode version + run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer + - name: Show Xcode version run: xcodebuild -version - - name: List available schemes - run: xcodebuild -list - - name: Run tests run: | xcodebuild \ -scheme "hsluv-objc" \ - -destination "${{ matrix.destination }}" \ + -destination "platform=macOS,arch=x86_64" \ -enableCodeCoverage YES \ - -derivedDataPath DerivedData \ CODE_SIGNING_REQUIRED=NO \ - test - - - name: Generate test report - if: always() - run: | - xcrun xccov view --report --json DerivedData/Logs/Test/*.xcresult > coverage.json || true - - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-${{ strategy.job-index }} - path: | - DerivedData/Logs/Test/ - coverage.json - retention-days: 30 \ No newline at end of file + test \ No newline at end of file