Enhance GitHub actions (#22)

* ⬆️ :: Update dev dependencies

* 🐛 :: Use correct badge url for CI status

* ♻️ :: Refactor CI action

* ♻️ :: Refactor action file

* ♻️ :: Rename workflow

* 🚚 :: Rename action file according action name

* ♻️ :: Update docs
This commit is contained in:
Felix M
2021-05-18 10:08:25 +02:00
committed by GitHub
parent 6d2517b0a6
commit 3e18c93100
26 changed files with 677 additions and 653 deletions
@@ -1,14 +1,32 @@
#
# github-actions.yml
# 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]
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 * * *'
# 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-latest
# 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!"
@@ -16,32 +34,31 @@ jobs:
- 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
run: bundle install
- name: Execute SwiftFormat and treat any formatting errors as real errors.
working-directory: ./Example
run: |
bundle exec fastlane format
run: bundle exec fastlane format
- name: Execute SwiftLint and treat any formatting errors as real errors.
working-directory: ./Example
run: |
bundle exec fastlane format
run: bundle exec fastlane format
- name: Execute tests.
working-directory: ./Example
run: |
bundle exec fastlane tests
run: bundle exec fastlane tests
- name: Execute validation of library.
working-directory: ./Example
run: |
bundle exec fastlane pod_lint
run: bundle exec fastlane pod_lint
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.2.1
- run: echo "🍏 This job's status is ${{ job.status }}."