Skip to content

Commit

Permalink
Merge pull request #15 from Squarespace/avyazovoy/GHA-CI
Browse files Browse the repository at this point in the history
Add GHA CI workflow
  • Loading branch information
Vyazovoy authored Oct 30, 2023
2 parents f417ba2 + 9fdde2b commit 10e238d
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
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 }}

0 comments on commit 10e238d

Please sign in to comment.