Skip to content

Update ShellScriptPlugin to use new process APIs #386

Update ShellScriptPlugin to use new process APIs

Update ShellScriptPlugin to use new process APIs #386

Workflow file for this run

on:
pull_request: {}
name: Test
jobs:
test:
name: Test
runs-on: macos-13
strategy:
matrix:
xcode: ['14.3']
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
})