Swift #37
Workflow file for this run
This file contains hidden or 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
| name: Swift | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: [self-hosted, X64, macOS] | |
| steps: | |
| - name: Trust GitHub SSH keys | |
| run: for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts | |
| - name: Install SSH key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_KEY }} | |
| name: id_rsa | |
| known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
| if_key_exists: ignore | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Lint | |
| run: swiftlint | |
| # if the latest version is not supported, just uncomment this so it uses the default version in your self-hosted runner | |
| - name: Setup latest Swift | |
| uses: fwal/setup-swift@v1.14.0 | |
| - name: Build and test | |
| run: | | |
| swift package generate-xcodeproj | |
| xcodebuild test -destination 'name=iPhone 13' -scheme 'CodableHelpers-Package' |