Skip to content
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
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: PactKit CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "*" ]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test-library:
name: Test PactKitCore
runs-on: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache Swift PM dependencies
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Select Xcode 16.4
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer

- name: Run library tests
run: swift test

build-example-app:
name: Build Example App
needs: build-and-test-library
runs-on: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Select Xcode 16.4
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer

- name: Build iOS Example App
run: |
xcodebuild build \
-project Examples/PactKit-iOS-Example/PactKit-iOS-Example.xcodeproj \
-scheme PactKit-iOS-Example \
-destination 'platform=iOS Simulator,name=iPhone 16 Pro'
45 changes: 45 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Documentation

on:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
deploy-docs:
name: Deploy Documentation
runs-on: macos-15

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Select Xcode 16.4
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer

- name: Generate DocC documentation
run: |
swift package \
--allow-writing-to-directory ./public \
generate-documentation \
--target PactKitCore \
--output-path ./public \
--transform-for-static-hosting \
--hosting-base-path PactKit

- name: Create .nojekyll file
run: touch ./public/.nojekyll

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: public
62 changes: 0 additions & 62 deletions .github/workflows/swift-ci.yml

This file was deleted.