Skip to content

Commit

Permalink
ci: Release circleci with GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 committed Dec 12, 2023
1 parent ac5f18c commit d434c4d
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 198 deletions.
197 changes: 0 additions & 197 deletions .circleci/config.yml

This file was deleted.

100 changes: 100 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Run CI
on:
push:
branches: [ main ]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'

jobs:
macos-build:
runs-on: macos-latest

strategy:
matrix:
include:
- xcode-version: 14.0.1
ios-sim: 'platform=iOS Simulator,name=iPhone 14,OS=16.0'
- xcode-version: 13.4.1
ios-sim: 'platform=iOS Simulator,name=iPhone 11,OS=15.5'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # If you only need the current version keep this.

- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: ${{ matrix.xcode-version }}

- name: Build & Test on macOS Simulator
run: xcodebuild test -scheme 'LDSwiftEventSource' -sdk macosx -destination 'platform=macOS' | xcpretty

- name: Build for ARM64 macOS
run: xcodebuild build -scheme 'LDSwiftEventSource' -arch arm64e -sdk macosx | xcpretty

- name: Build Tests for iOS device
run: xcodebuild build-for-testing -scheme 'LDSwiftEventSource' -sdk iphoneos CODE_SIGN_IDENTITY= | xcpretty

- name: Build & Test on iOS Simulator
run: xcodebuild test -scheme 'LDSwiftEventSource' -sdk iphonesimulator -destination '<<parameters.ios-sim>>' CODE_SIGN_IDENTITY= | xcpretty

- name: Build Tests for tvOS device
run: xcodebuild build-for-testing -scheme 'LDSwiftEventSource' -sdk appletvos CODE_SIGN_IDENTITY= | xcpretty

- name: Build & Test on tvOS Simulator
run: xcodebuild test -scheme 'LDSwiftEventSource' -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty

- name: Build for watchOS simulator # No XCTest testing on watchOS
run: xcodebuild build -scheme 'LDSwiftEventSource' -sdk watchsimulator | xcpretty

- name: Build for watchOS device # No XCTest testing on watchOS
run: xcodebuild build -scheme 'LDSwiftEventSource' -sdk watchos | xcpretty

- name: Build & Test with swiftpm
run: swift test -v 2>&1 | xcpretty

- name: Run contract tests
run: make contract-tests

- name: Install jazzy gem
run: |
gem install jazzy
gem cleanup
- name: Build Documentation
run: jazzy -o artifacts/docs

- name: Validate coverage
run: |
FULLDOC=`jq '.warnings | length == 0' artifacts/docs/undocumented.json`
[ $FULLDOC == "true" ]
linux-build:
runs-on: ubuntu-latest

strategy:
matrix:
swift-version:
- 5.2
- 5.3
- 5.4
- 5.5
- 5.6
- 5.7
- 5.8
- 5.9

container: swift:${{ matrix.swift-version }}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # If you only need the current version keep this.

- name: Build and test
run: swift test --enable-test-discovery
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ start-contract-test-service-bg:

run-contract-tests:
curl -s https://raw.githubusercontent.com/launchdarkly/sse-contract-tests/main/downloader/run.sh \
| VERSION=v2 PARAMS="-url http://localhost:8000 -debug -stop-service-at-end -skip 'basic parsing/large message in two chunks'" sh
| PARAMS="-url http://localhost:8000 -debug -stop-service-at-end -skip 'basic parsing/large message in one chunk' -skip 'basic parsing/large message in two chunks'" sh

contract-tests: build-contract-tests start-contract-test-service-bg run-contract-tests

Expand Down

0 comments on commit d434c4d

Please sign in to comment.