Skip to content

Invitation Code Verification Module #150

Invitation Code Verification Module

Invitation Code Verification Module #150

Workflow file for this run

#
# This source file is part of the Stanford Spezi open-source project
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
name: Build and Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
buildandtest:
name: Build and Test Swift Package
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
artifactname: SpeziFirebase-Package.xcresult
runsonlabels: '["macOS", "self-hosted"]'
scheme: SpeziFirebase-Package
buildandtestuitests:
name: Build and Test UI Tests
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
artifactname: UITests.xcresult
runsonlabels: '["macOS", "self-hosted"]'
setupfirebaseemulator: true
path: Tests/UITests
customcommand: |
firebase emulators:exec 'set -o pipefail && xcodebuild test -project UITests.xcodeproj -scheme TestApp -destination "platform=iOS Simulator,name=iPhone 15 Pro" -resultBundlePath UITests.xcresult -derivedDataPath ".derivedData" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcbeautify'
testandcoverage:
name: Test and Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
- name: Install Node Dependencies and run the tests
run: cd spezi-invitation-code && npm ci && npm test
env:
CI: TRUE
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
uploadcoveragereport:
name: Upload Coverage Report
needs: [buildandtest, buildandtestuitests]
uses: StanfordSpezi/.github/.github/workflows/create-and-upload-coverage-report.yml@v2
with:
coveragereports: SpeziFirebase-Package.xcresult UITests.xcresult
secrets:
token: ${{ secrets.CODECOV_TOKEN }}