From c84c887d2012485ece937d10dfe67e4a097bdb22 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Fri, 7 Jun 2024 15:29:02 -0700 Subject: [PATCH] Add Peripery (#75) # Add Periphery ## :gear: Release Notes - Adds a Periphery GitHub Action ### Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md). --- .github/workflows/periphery.yml | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/periphery.yml diff --git a/.github/workflows/periphery.yml b/.github/workflows/periphery.yml new file mode 100644 index 0000000..2128ad4 --- /dev/null +++ b/.github/workflows/periphery.yml @@ -0,0 +1,57 @@ +# +# This source file is part of the Stanford Biodesign Digital Health Group open-source organization +# +# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) +# +# SPDX-License-Identifier: MIT +# + +name: Periphery + +on: + workflow_call: + inputs: + path: + description: 'The path where the project is located. Defaults to $GITHUB_WORKSPACE' + required: false + type: string + default: '.' + runsonlabels: + description: 'JSON-based collection of labels indicating which type of github runner should be chosen' + required: false + type: string + default: '["macos-14"]' + xcodeversion: + description: 'The Xcode version used for the build' + required: false + type: string + default: 'latest-stable' + +permissions: + contents: read + +jobs: + periphery: + name: Periphery + runs-on: ${{ fromJson(inputs.runsonlabels) }} + defaults: + run: + working-directory: ${{ inputs.path }} + environment: ${{ inputs.environment }} + steps: + - uses: actions/checkout@v4 + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{ inputs.xcodeversion }} + - name: Check environment + run: | + xcodebuild -version + swift --version + echo "env.selfhosted: ${{ env.selfhosted }}" + echo "environment: ${{ inputs.environment }}" + - name: Install periphery + if: ${{ !env.selfhosted }} + run: brew install peripheryapp/periphery/periphery + - name: Run periphery + run: | + periphery scan --relative-results --format github-actions --strict -- -skipPackagePluginValidation -skipMacroValidation