ci: bump actions/upload-artifact from 6.0.0 to 7.0.1 #60
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nick CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build-and-test: | |
| runs-on: macos-26 | |
| timeout-minutes: 45 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Select Xcode | |
| run: | | |
| XCODE_PATH="$(find /Applications -maxdepth 1 -type d -name 'Xcode*.app' | sort -V | tail -1)" | |
| test -n "$XCODE_PATH" | |
| sudo xcode-select -s "$XCODE_PATH" | |
| xcodebuild -version | |
| - name: Validate repository | |
| run: ./Scripts/validate-repository.sh | |
| - name: Build Nick | |
| run: | | |
| xcodebuild build \ | |
| -project Nick.xcodeproj \ | |
| -scheme Nick \ | |
| -destination "platform=macOS" \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO | |
| - name: Build shipping components | |
| run: | | |
| for scheme in NickExtension NickNetFilter NickHelper NickUninstaller; do | |
| xcodebuild build \ | |
| -project Nick.xcodeproj \ | |
| -scheme "$scheme" \ | |
| -destination "platform=macOS" \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO | |
| done | |
| - name: Run Tests | |
| run: | | |
| rm -rf TestResults.xcresult | |
| xcodebuild test \ | |
| -project Nick.xcodeproj \ | |
| -scheme Nick \ | |
| -destination "platform=macOS" \ | |
| -enableCodeCoverage YES \ | |
| -resultBundlePath TestResults.xcresult \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO | |
| - name: Test Summary | |
| if: always() | |
| run: | | |
| xcrun xcresulttool get test-results summary \ | |
| --path TestResults.xcresult 2>/dev/null || echo "Test results unavailable" | |
| - name: Upload Xcode result bundle | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: TestResults | |
| path: TestResults.xcresult | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| - name: Convert coverage for Codecov | |
| run: | | |
| ./Scripts/xccov-to-lcov.sh TestResults.xcresult > coverage.lcov | |
| test -s coverage.lcov | |
| - name: Upload coverage reports to Codecov | |
| if: env.CODECOV_TOKEN != '' | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2 | |
| with: | |
| token: ${{ env.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| files: coverage.lcov | |
| disable_search: true | |
| flags: macos | |
| use_pypi: true | |
| version: v11.3.1 | |
| - name: Convert coverage for SonarCloud | |
| if: env.SONAR_TOKEN != '' | |
| run: | | |
| ./Scripts/xccov-to-sonarqube.sh TestResults.xcresult > sonar-coverage.xml | |
| test -s sonar-coverage.xml | |
| - name: Run SonarCloud analysis | |
| if: env.SONAR_TOKEN != '' | |
| uses: SonarSource/sonarqube-scan-action@c7ee0f9df90b7aa20e8dcf9695dcfe2e7da5b4f2 # v7.2.1 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| with: | |
| args: > | |
| -Dsonar.qualitygate.wait=true |