Skip to content

[feat]: Add CI workflow to run tests #19

[feat]: Add CI workflow to run tests

[feat]: Add CI workflow to run tests #19

Workflow file for this run

name: "Networking CI"
on:
push:
branches:
- master
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# unit-tests:
# name: ${{ matrix.name }}
# runs-on: ${{ matrix.runsOn }}
# env:
# DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
# timeout-minutes: 10
# strategy:
# fail-fast: false
# matrix:
# include:
# - name: 'iOS 17.2'
# destination: 'OS=17.2,name=iPhone 15 Pro'
# xcode: 'Xcode_15.2'
# runsOn: macos-13
## - name: 'iOS 16.4'
## destination: 'OS=16.4,name=iPhone 14 Pro'
## xcode: 'Xcode_14.3.1'
## runsOn: macos-13
# - name: 'macOS 13, Xcode 15.1'
# destination: 'OS=macOS'
# xcode: 'Xcode_15.1' #
# runsOn: macos-13
# steps:
# - uses: actions/checkout@v4
#
# - name: 'Running unit tests on ${{ matrix.name }}'
# run: |
# set -o pipefail && \
# xcodebuild -skipPackagePluginValidation -scheme "Networking" -destination "${{ matrix.destination }}" clean -resultBundlePath "TestResults-${{ matrix.name }}" test | xcpretty
#
# - uses: kishikawakatsumi/xcresulttool@v1
# with:
# path: 'TestResults-${{ matrix.name }}.xcresult'
# title: '${{ matrix.name }} Test Results'
# upload-bundles: 'failure'
# if: success() || failure()
build_and_test:
name: ${{ matrix.command }} on  ${{ matrix.platform }} (xcode ${{ matrix.xcode }}, ${{ matrix.macos }})
runs-on: ${{ matrix.macos }}
strategy:
fail-fast: false
matrix:
xcode: ['15.2']
macos: ['macos-13']
scheme: ['Networking']
command: ['test']
platform: ['macOS', 'iOS']
steps:
- name: Switch xcode to ${{ matrix.xcode }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Double-check macOS version (${{ matrix.macos }})
run: sw_vers
- name: Code Checkout
uses: actions/checkout@v2
- name: Check xcodebuild version
run: xcodebuild -version
- name: Check xcode embedded SDKs
run: xcodebuild -showsdks
- name: Show buildable schemes
run: xcodebuild -list
- name: Show eligible build destinations for ${{ matrix.scheme }}
run: xcodebuild -showdestinations -scheme ${{ matrix.scheme }}
- uses: mxcl/xcodebuild@v1
with:
platform: ${{ matrix.platform }}
scheme: ${{ matrix.scheme }}
action: ${{ matrix.command }}
code-coverage: true
verbosity: xcpretty
upload-logs: always