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

Release Candidate 3.0.0 #40

Merged
merged 13 commits into from
May 10, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions .github/actions/build_and_test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Test Action

inputs:
scheme:
required: true
type: string
destination:
required: true
type: string
name:
required: true
type: string
test_plan:
required: false
type: string
generate_project:
required: false
type: boolean
default: true

runs:
using: "composite"

steps:
- name: Install Dependencies & Generate project
shell: bash
run: |
if [ "${{ inputs.generate_project }}" = "true" ]; then
make setup_build_tools
make generate
fi
- name: ${{ inputs.name }}
shell: bash
run: |
if [ -n "${{ inputs.test_plan }}" ]; then
xcodebuild clean test \
-scheme ${{ inputs.scheme }} \
-destination "${{ inputs.destination }}" \
-testPlan ${{ inputs.test_plan }} \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ inputs.name }}.xcresult" || exit 1
else
xcodebuild clean test \
-scheme ${{ inputs.scheme }} \
-destination "${{ inputs.destination }}" \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ inputs.name }}.xcresult" || exit 1
fi
34 changes: 34 additions & 0 deletions .github/actions/upload_test_coverage_report/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Upload a Test Coverage Report

inputs:
filename:
required: true
type: string
scheme_name:
required: true
type: string
token:
description: 'A CodeCov Token'
required: true

runs:
using: "composite"

steps:
- name: Dir
shell: bash
run: pwd && ls -al
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ inputs.token }}
xcode: true
flags: ${{ inputs.scheme_name }}
xcode_archive_path: test_output/${{ inputs.filename }}.xcresult
- name: Dir
shell: bash
run: pwd && ls -al
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.filename }}
path: test_output
25 changes: 22 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,26 @@

version: 2
updates:
- package-ecosystem: "swift" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: github-actions
directory: /
open-pull-requests-limit: 10
schedule:
interval: "daily"
interval: daily
time: '07:00'
timezone: Europe/Berlin
assignees:
- nik3212
reviewers:
- nik3212

- package-ecosystem: swift
directory: /
open-pull-requests-limit: 10
schedule:
interval: daily
time: '07:00'
timezone: Europe/Berlin
assignees:
- nik3212
reviewers:
- nik3212
2 changes: 1 addition & 1 deletion .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ruby-version: 3.1.4
bundler-cache: true
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup gems
run: |
gem install bundler
Expand Down
110 changes: 50 additions & 60 deletions .github/workflows/ci.yml → .github/workflows/flare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,13 @@ on:
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "[email protected]"
- "[email protected]"
- "Package.swift"
- "Source/**"
- "Source/Flare/**"
- "Tests/**"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
with:
args: --strict
env:
DIFF_BASE: ${{ github.base_ref }}
macOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
Expand All @@ -47,19 +39,20 @@ jobs:
runsOn: macOS-12
name: "macOS 12, Xcode 14.1, Swift 5.7.1"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Flare" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
uses: ./.github/actions/build_and_test
with:
scheme: Flare
destination: "platform=macOS"
name: ${{ matrix.name }}
path: test_output
generate_project: false
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

iOS:
name: ${{ matrix.name }}
Expand All @@ -80,17 +73,20 @@ jobs:
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: make setup_build_tools
- name: Generate project
run: make generate
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- uses: actions/upload-artifact@v4
uses: ./.github/actions/build_and_test
with:
scheme: Flare
destination: ${{ matrix.destination }}
name: ${{ matrix.name }}
path: test_output
test_plan: AllTests
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

tvOS:
name: ${{ matrix.name }}
Expand All @@ -111,23 +107,20 @@ jobs:
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: make setup_build_tools
- name: Generate project
run: make generate
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
uses: ./.github/actions/build_and_test
with:
scheme: Flare
destination: ${{ matrix.destination }}
name: ${{ matrix.name }}
path: test_output
test_plan: AllTests
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

watchOS:
name: ${{ matrix.name }}
Expand All @@ -152,23 +145,20 @@ jobs:
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: make setup_build_tools
- name: Generate project
run: make generate
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan UnitTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
uses: ./.github/actions/build_and_test
with:
scheme: Flare
destination: ${{ matrix.destination }}
name: ${{ matrix.name }}
path: test_output
test_plan: UnitTests
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

spm:
name: ${{ matrix.name }}
Expand All @@ -187,7 +177,7 @@ jobs:
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: swift build -c release --target Flare

Expand All @@ -212,7 +202,7 @@ jobs:
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Discover typos
run: |
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
Expand All @@ -234,6 +224,6 @@ jobs:
# name: "visionOS 1.0"
# scheme: "Flare"
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - name: ${{ matrix.name }}
# run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean || exit 1
Loading
Loading