Skip to content

Commit

Permalink
Run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentTreguier committed Jul 31, 2024
1 parent 5f56791 commit 1909eea
Showing 1 changed file with 51 additions and 3 deletions.
54 changes: 51 additions & 3 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
- name: Prepare files
if: ${{ matrix.distribution == 'app-store' }}
env:
DEVELOPMENT_TEAM: ${{ vars.TEAM_ID }}
CODE_SIGN_IDENTITY: 'Apple Distribution'
PROVISIONING_PROFILE_SPECIFIER: ${{ matrix.platform == 'macOS' && vars.PROVISIONING_PROFILE_NAME_MACOS || vars.PROVISIONING_PROFILE_NAME }}
SENTRY_DSN: ${{ matrix.platform == 'iOS' && secrets.SENTRY_DSN_IOS || secrets.SENTRY_DSN_MACOS }}
Expand All @@ -100,6 +101,7 @@ jobs:
- name: Prepare files
if: ${{ matrix.distribution == 'standalone' }}
env:
DEVELOPMENT_TEAM: ${{ vars.TEAM_ID }}
CODE_SIGN_IDENTITY: 'Developer ID Application'
PROVISIONING_PROFILE_SPECIFIER: ${{ vars.PROVISIONING_PROFILE_NAME_MACOS_STANDALONE }}
run: make
Expand All @@ -114,10 +116,9 @@ jobs:
- name: Build app
env:
CODE_SIGN_IDENTITY: Apple Distribution
PROVISIONING_PROFILE_SPECIFIER: Fyreplace
PROVISIONING_PROFILE_SPECIFIER: ${{ vars.PROVISIONING_PROFILE_NAME }}
run: |
xcodebuild archive \
DEVELOPMENT_TEAM=${{ vars.TEAM_ID }} \
-allowProvisioningUpdates \
-authenticationKeyPath /tmp/connect-key.p8 \
-authenticationKeyID ${{ vars.APP_STORE_CONNECT_KEY_ID }} \
Expand Down Expand Up @@ -176,9 +177,56 @@ jobs:
path: Export/Fyreplace.pkg
if-no-files-found: error

test:
name: Test
runs-on: macos-latest
environment: apple-app-store
strategy:
matrix:
platform:
- macOS
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Cache packages
uses: actions/cache@v4
with:
path: |
~/Library/Caches/org.swift.swiftpm
~/Library/Developer/Xcode/DerivedData/**/SourcePackages/checkouts
~/Library/Developer/Xcode/DerivedData/**/SourcePackages/repositories
key: ${{ runner.os }}-${{ matrix.platform }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-${{ matrix.platform }}-spm-
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_$(cat .xcode-version).app/Contents/Developer

- name: Prepare files
env:
DEVELOPMENT_TEAM: ${{ vars.TEAM_ID }}
CODE_SIGN_IDENTITY: 'Developer ID Application'
PROVISIONING_PROFILE_SPECIFIER: ${{ vars.PROVISIONING_PROFILE_NAME_MACOS_STANDALONE }}
run: make

- name: Trust OpenAPI plugin
run: bash .github/workflows/trust-openapi-plugin.sh

- name: Run tests
run: |
xcodebuild test \
-scheme Fyreplace \
-only-testing FyreplaceTests
publish:
name: Publish
needs: build
needs:
- build
- test
runs-on: macos-latest
environment: apple-app-store
strategy:
Expand Down

0 comments on commit 1909eea

Please sign in to comment.