-
Notifications
You must be signed in to change notification settings - Fork 65
76 lines (62 loc) · 2.77 KB
/
continuous-integration.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
76
#
# continuous-integration.yml
# Created by Felix Mau (https://felix.hamburg)
#
# Based on:
# - https://docs.github.com/en/actions/quickstart
# - https://futurestud.io/tutorials/github-actions-trigger-builds-on-schedule-cron#schedulegithubactionsusingacron
# - https://about.codecov.io/blog/code-coverage-for-ios-development-using-swift-xcode-and-github-actions/
#
name: Continuous Integration
on:
push:
pull_request:
schedule:
# Run workflow every day at midnight.
#
# - Note: "Scheduled workflows run on the latest commit on the default or base branch."
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events
- cron: '0 0 * * *'
# Use latest Xcode version.
#
# Source:
# - https://www.jessesquires.com/blog/2020/01/06/selecting-an-xcode-version-on-github-ci/
# - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#xcode
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
jobs:
# This workflow starts with a job called "build-and-test".
build-and-test:
name: Build & Test
runs-on: macos-12
# Steps represent a sequence of tasks that will be executed as part of the job.
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v2
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: Install dependencies
working-directory: ./Example
run: bundle install
- name: Execute SwiftFormat and treat any formatting errors as real errors.
working-directory: ./Example
run: bundle exec fastlane format
- name: Execute SwiftLint and treat any formatting errors as real errors.
working-directory: ./Example
run: bundle exec fastlane lint
- name: Execute tests.
working-directory: ./Example
run: bundle exec fastlane tests
- name: Execute validation Carthage support.
working-directory: ./Example
run: bundle exec fastlane verify_carthage
- name: Execute validation of library.
working-directory: ./Example
run: bundle exec fastlane pod_lint
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
- run: echo "🍏 This job's status is ${{ job.status }}."