Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GHA CI workflow #15

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/fixed_podspecs/Dwifft.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Pod::Spec.new do |s|
s.name = 'Dwifft'
s.version = '0.9'
s.license = 'MIT'
s.summary = 'Swift Diff'
s.homepage = 'https://github.com/jflinter/Dwifft'
s.social_media_url = 'http://twitter.com/jflinter'
s.author = 'Jack Flintermann'
s.source = { git: 'https://github.com/jflinter/Dwifft.git', tag: s.version }

s.swift_version = '5.0'

s.ios.deployment_target = '12.0'
s.tvos.deployment_target = '12.0'
s.osx.deployment_target = '10.13'

s.source_files = 'Dwifft/*.swift'

s.requires_arc = true
end
17 changes: 17 additions & 0 deletions .github/fixed_podspecs/SwiftyJSON.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Pod::Spec.new do |s|
s.name = "SwiftyJSON"
s.version = "5.0.1"
s.summary = "SwiftyJSON makes it easy to deal with JSON data in Swift"
s.homepage = "https://github.com/SwiftyJSON/SwiftyJSON"
s.license = { :type => "MIT" }
s.authors = { "lingoer" => "[email protected]", "tangplin" => "[email protected]" }

s.requires_arc = true
s.swift_version = "5.0"
s.osx.deployment_target = "10.13"
s.ios.deployment_target = "12.0"
s.watchos.deployment_target = "4.0"
s.tvos.deployment_target = "12.0"
s.source = { :git => "https://github.com/SwiftyJSON/SwiftyJSON.git", :tag => s.version }
s.source_files = "Source/SwiftyJSON/*.swift"
end
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci
on:
pull_request:

workflow_dispatch:

push:
branches:
- master

jobs:
run_pod_tests:
name: Run pod tests
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Define validation directory
id: define_validation_dir
run: echo "path=${{ runner.temp }}/validation_${{ github.run_number }}_${{ github.run_attempt }}" >> $GITHUB_OUTPUT

- name: Run pod unit tests
run: |
bundle exec pod lib lint \
--allow-warnings \
--external-podspecs=".github/fixed_podspecs/**/*.podspec" \
--validation-dir="${{ steps.define_validation_dir.outputs.path }}" \
--no-clean

- name: Upload test artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test_artifacts
path: ${{ steps.define_validation_dir.outputs.path }}