|
10 | 10 | workflow_dispatch:
|
11 | 11 |
|
12 | 12 | jobs:
|
13 |
| - build: |
14 |
| - name: Build ${{ matrix.swift }} on ${{ matrix.os }} |
15 |
| - runs-on: ${{ matrix.os }} |
16 |
| - strategy: |
17 |
| - matrix: |
18 |
| - os: [ubuntu-latest, macos-latest] |
19 |
| - swift: ["5.4", "5.5", "5.6"] |
| 13 | + macos: |
| 14 | + name: Build and test on macos-latest |
| 15 | + runs-on: macOS-latest |
20 | 16 | steps:
|
21 |
| - - uses: swift-actions/setup-swift@v1 |
22 |
| - with: |
23 |
| - swift-version: ${{ matrix.swift }} |
24 | 17 | - uses: actions/checkout@v2
|
25 | 18 | - name: Set code coverage path
|
26 | 19 | run: echo "codecov_path=$(swift test --show-codecov-path)" >> $GITHUB_ENV
|
27 | 20 | - name: Test and publish code coverage to Code Climate
|
28 |
| - if: ${{ matrix.os }} == "macos-latest" |
29 | 21 | uses: paulofaria/codeclimate-action@master
|
30 | 22 | env:
|
31 | 23 | CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
|
32 | 24 | with:
|
33 | 25 | downloadUrl: https://github.com/paulofaria/test-reporter/releases/download/0.9.0/test-reporter-0.9.0-darwin-amd64
|
34 |
| - coverageCommand: swift test --enable-code-coverage |
| 26 | + coverageCommand: swift test --enable-test-discovery --enable-code-coverage |
35 | 27 | coverageLocations: ${{ env.codecov_path }}:lcov-json
|
| 28 | + |
| 29 | + linux: |
| 30 | + name: Build ${{ matrix.swift }} on ${{ matrix.os }} |
| 31 | + runs-on: ${{ matrix.os }} |
| 32 | + strategy: |
| 33 | + matrix: |
| 34 | + os: [ubuntu-latest] |
| 35 | + swift: ["5.4", "5.5", "5.6"] |
| 36 | + steps: |
| 37 | + - uses: swift-actions/setup-swift@v1 |
| 38 | + with: |
| 39 | + swift-version: ${{ matrix.swift }} |
| 40 | + - uses: actions/checkout@v2 |
36 | 41 | - name: Test
|
37 |
| - if: ${{ matrix.os }} != "macos-latest" |
38 | 42 | run: swift test
|
39 |
| - |
40 |
| - |
41 |
| - |
42 |
| -# macos: |
43 |
| -# name: Build and test on macos-latest |
44 |
| -# runs-on: macOS-latest |
45 |
| -# steps: |
46 |
| -# - uses: actions/checkout@v2 |
47 |
| -# - name: Set code coverage path |
48 |
| -# run: echo "codecov_path=$(swift test --show-codecov-path)" >> $GITHUB_ENV |
49 |
| -# - name: Test and publish code coverage to Code Climate |
50 |
| -# uses: paulofaria/codeclimate-action@master |
51 |
| -# env: |
52 |
| -# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} |
53 |
| -# with: |
54 |
| -# downloadUrl: https://github.com/paulofaria/test-reporter/releases/download/0.9.0/test-reporter-0.9.0-darwin-amd64 |
55 |
| -# coverageCommand: swift test --enable-test-discovery --enable-code-coverage |
56 |
| -# coverageLocations: ${{ env.codecov_path }}:lcov-json |
57 |
| - |
58 |
| -# linux: |
59 |
| -# name: Build and test on ${{ matrix.tag }}-${{ matrix.os }} |
60 |
| -# runs-on: ubuntu-latest |
61 |
| -# strategy: |
62 |
| -# matrix: |
63 |
| -# os: |
64 |
| -# - focal |
65 |
| -# - bionic |
66 |
| -# tag: |
67 |
| -# - swift:5.3 |
68 |
| -# - swift:5.4 |
69 |
| -# container: |
70 |
| -# image: ${{ matrix.tag }}-${{ matrix.os }} |
71 |
| -# steps: |
72 |
| -# - name: Checkout |
73 |
| -# uses: actions/checkout@v2 |
74 |
| -# - name: Test |
75 |
| -# run: swift test --enable-test-discovery --enable-code-coverage --sanitize=thread |
0 commit comments