Improve permissions UX #554
Workflow file for this run
This file contains 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
on: | |
pull_request: {} | |
name: Test | |
jobs: | |
test: | |
name: Test | |
runs-on: macos-13 | |
strategy: | |
matrix: | |
xcode: ['15.2'] | |
steps: | |
- name: Set Xcode ${{ matrix.xcode }} | |
run: | | |
echo "Available Xcode versions:" | |
ls /Applications | grep Xcode | |
echo "Choosing Xcode_${{ matrix.xcode }}.app" | |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
xcodebuild -version | |
swift --version | |
swift package --version | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Install misu | |
run: | | |
curl https://mise.run | sh | |
misu install | |
- name: Run tuist | |
run: | | |
touch .env | |
echo "APP_NAME=Keyboard Cowboy" >> .env | |
echo -e "APP_SCHEME=Keyboard-Cowboy" >> .env | |
echo -e "APP_BUNDLE_IDENTIFIER=com.zenangst.Keyboard-Cowboy" >> .env | |
echo -e "TEAM_ID=XXXXXXXXXX" >> .env | |
echo -e "PACKAGE_DEVELOPMENT=false" >> .env | |
tuist fetch | |
tuist generate -n | |
- name: Run tests | |
uses: sersoft-gmbh/xcodebuild-action@v2 | |
with: | |
workspace: "Keyboard Cowboy.xcworkspace" | |
scheme: "Keyboard-Cowboy" | |
destination: platform=macOS | |
action: test | |
result-bundle-path: ResultBundle.xcresult | |
sdk: macosx | |
build-settings: CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED="NO" | |
- name: xcresulttool | |
uses: kishikawakatsumi/xcresulttool@v1 | |
with: | |
path: ResultBundle.xcresult | |
if: success() || failure() | |
- name: Upload test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Test results | |
path: ResultBundle.xcresult | |
- name: Add comment to PR | |
uses: actions/github-script@v6 | |
if: always() | |
with: | |
script: | | |
const name = '${{ github.workflow }}'; | |
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'; | |
const success = '${{ job.status }}' === 'success'; | |
const body = `${name}: ${success ? 'succeeded ✅' : 'failed ❌'}\n${url}\n\n@${{ github.event.pull_request.user.login }}`; | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: body | |
}) |