Improve support for UserSpace environment variables #512
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.0.1'] | |
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 and 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 | |
brew install tuist | |
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 | |
}) |