-
-
Notifications
You must be signed in to change notification settings - Fork 320
60 lines (57 loc) · 1.68 KB
/
xcodeproj.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
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idname
name: XcodeProj
on: [push, pull_request]
concurrency:
group: xcodeproj-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
name: Build (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build
run: swift build -c release
build-linux:
name: Build (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: swift build -c release
test:
name: Test (macOS / Xcode)
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Run tests
run: swift test --enable-code-coverage
- name: Send test coverage report
run: bash <(curl -s https://codecov.io/bash)
test-linux:
name: Test (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Git config
run: |
git config --global user.email "xcodeproj@tuist.io"
git config --global user.name "xcodeproj"
git config --global init.defaultBranch main
- name: Build and run tests
run: swift test --enable-test-discovery
swiftlint:
name: Swiftlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}