forked from tsanto/Calculator-SPM-local
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.08 KB
/
testing.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
64
65
66
67
68
69
70
71
72
73
74
75
name: Testing
on:
push:
branches:
- master
jobs:
test:
name: Testing Swift Package and iOS app
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
- name: 'Get next minor version'
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: 'Create new milestone'
id: createmilestone
uses: "WyriHaximus/github-action-create-milestone@v1"
with:
title: ${{ steps.semvers.outputs.patch }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Slack Notification
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#testing'
if: always()
# - name: Install SwiftFormat
# run: brew install swiftformat
# - name: Format Swift code
# run: swiftformat --verbose .
lint:
name: SwiftLint
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: SwiftLint
uses: norio-nomura/[email protected]
# code-coverage:
# runs-on: macOS-latest
# steps:
# - name: Test
# uses: actions/checkout@v1
# - name: Build and Test
# run: xcodebuild test -project Calculator iOS.xcodeproj -scheme CodecovDemo -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' -enableCodeCoverage YES build test
# - name: Upload coverage to Codecov
# uses: codecov/[email protected]