Merge pull request #285 from codesmith-emmy/patch-1 #193
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
name: CI | |
on: | |
push: | |
branches: [main, versions] | |
pull_request: | |
branches: [main] | |
jobs: | |
cancel-previous-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs of this workflow on same branch | |
uses: rokroskar/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
swiftlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run SwiftLint | |
uses: norio-nomura/[email protected] | |
with: | |
args: --strict | |
build-macos: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Run tests | |
run: swift build -v -c release | |
test-macos: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Setup secrets.json | |
run: | | |
echo ' | |
{ | |
"deepLApiKey": "${{ secrets.DEEP_L_API_KEY }}", | |
"microsoftSubscriptionKey": "${{ secrets.MICROSOFT_SUBSCRIPTION_KEY }}" | |
} | |
' >> Tests/BartyCrouchTranslatorTests/Secrets/secrets.json | |
- name: Run tests | |
run: swift test -v |