-
-
Notifications
You must be signed in to change notification settings - Fork 121
63 lines (48 loc) · 1.3 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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