Skip to content

ci: use GH Actions

ci: use GH Actions #13

Workflow file for this run

name: CI/CD
on:
push:
branches:
- 'refs/heads/*'
- '!refs/tags/*'
pull_request:
branches:
- '*'
paths:
- '*'
- '!README.md'
- '!LICENSE'
- '!CODE_OF_CONDUCT.md'
- '!CONTRIBUTING.md'
- '!website/**'
jobs:
danger-swiftlint:
name: Danger SwiftLint
continue-on-error: true
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install SwiftLint and Danger Swift
run: |
brew install swiftlint
brew install danger/tap/danger-swift
export DANGER_GITHUB_API_TOKEN='${{ secrets.DANGER_GITHUB_API_TOKEN }}'
- name: Run Danger SwiftLint
run: danger-swift ci
pod-lint:
name: PodLint
needs: danger-swiftlint
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install CocoaPods
run: pod install
- name: Lint pod library
run: pod lib lint --skip-tests --platforms=macos,ios,tvos
build:
name: Build
needs: danger-swiftlint
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install CocoaPods
run: pod install
- name: Build Xcode App
uses: actions/xcode@v3
with:
actions: build
sdk: iphoneos
scheme: AppleReminders
configuration: Debug
xcWorkspacePath: Example/AppleReminders.xcworkspace
xcodeVersion: default
test:
name: Test
needs: build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install CocoaPods
run: pod install
- name: Running tests
uses: actions/xcode@v3
with:
actions: test
sdk: iphonesimulator
configuration: Debug
xcWorkspacePath: Tests/Tests.xcworkspace
scheme: Tests
xcodeVersion: default
- name: Upload coverage to codecov.io
run: cd Tests && bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
- name: Publish tests results
uses: actions/publish-test-results@v3
with:
testResultsFiles: '**/*.xml'