Skip to content

Commit

Permalink
Add Action to verify PR
Browse files Browse the repository at this point in the history
  • Loading branch information
readefries committed Apr 23, 2021
1 parent 509822b commit af01863
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Check PR

on:
pull_request:
branches: [ main ]

env:
PROJECT_FILE: RFISO8601DateTime.xcodeproj
PROJECT_SCHEME: RFISO8601DateTimeTests
PODSPEC_FILE: RFISO8601DateTime.podspec

jobs:
build:

runs-on: macos-latest

strategy:
matrix:
xcode:
- destination: platform=iOS Simulator,OS=latest,name=iPhone 11
version : latest-stable
- destination: platform=iOS Simulator,OS=14.4,name=iPhone 11
version: 12.4
- destination: platform=iOS Simulator,OS=13.7,name=iPhone 11
version: 11.7
- destination: platform=iOS Simulator,OS=12.4,name=iPhone 7
version: 10.3

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode.version }}

- name: Xcode Test
uses: devbotsxyz/[email protected]
with:
project: ${{ env.PROJECT_FILE }}
scheme: ${{ env.PROJECT_SCHEME }}
configuration: Debug
destination: ${{ matrix.xcode.destination }}

- uses: codecov/codecov-action@v1
name: Determine code coverage with CodeCov

- name: Sed new version in Podspec
run: sed -i "" -e 's|<LIB_VERSION>|1.1.1|g' ${{ env.PODSPEC_FILE }}

- name: Perform Cocoapod lib lint validation
run: make validate
2 changes: 1 addition & 1 deletion RFISO8601DateTime.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "RFISO8601DateTime"
s.version = "3.0.3"
s.version = "<LIB_VERSION>"
s.summary = "A library to easily use ISO8601 date and time."
s.swift_version = "5.0"
s.description = <<-DESC
Expand Down

0 comments on commit af01863

Please sign in to comment.