Hijack environment to run tests in PRs (#1124)

Avoid the complications of accessing the PassepartoutKit private
repository by running tests against the public binary distribution.

Also a way to make sure that the framework is up to date.
This commit is contained in:
Davide 2025-01-29 15:45:19 +01:00 committed by GitHub
parent 04b574c3f1
commit 6f516d030e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View File

@ -8,7 +8,6 @@ on:
- ".env.*" - ".env.*"
- "**/*.md" - "**/*.md"
- "**/*.sh" - "**/*.sh"
- "**/*.yml"
- "fastlane/**" - "fastlane/**"
concurrency: concurrency:
@ -21,10 +20,17 @@ jobs:
runs-on: macos-15 runs-on: macos-15
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- uses: passepartoutvpn/action-prepare-xcode-build@master - uses: actions/checkout@v4
with: with:
access_token: ${{ secrets.ACCESS_TOKEN }} submodules: false
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.1
- name: "Run tests" - name: "Run tests"
run: | run: |
sed -i '' "s/environment = .production/environment = .onlineDevelopment/" "Packages/PassepartoutKit-Framework/Package.swift"
cd Packages/App cd Packages/App
swift test swift test

View File

@ -4,7 +4,6 @@ on:
workflow_dispatch: workflow_dispatch:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }} FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
XCODEPROJ: "Passepartout.xcodeproj/project.pbxproj" XCODEPROJ: "Passepartout.xcodeproj/project.pbxproj"

View File

@ -21,7 +21,7 @@ enum Environment {
return [] return []
case .onlineDevelopment: case .onlineDevelopment:
return [ return [
.package(url: "https://github.com/passepartoutvpn/passepartoutkit", from: "0.99.5") .package(url: "https://github.com/passepartoutvpn/passepartoutkit", from: "0.99.7")
] ]
case .production: case .production:
return [ return [