Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nik3212 committed Feb 28, 2024
1 parent 60349bd commit e5b8cd5
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 72 deletions.
48 changes: 16 additions & 32 deletions .github/workflows/flare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ on:
- "Tests/**"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: sinoru/actions-swiftlint@v6
with:
args: --strict
env:
DIFF_BASE: ${{ github.base_ref }}
macOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
Expand Down Expand Up @@ -57,16 +47,12 @@ jobs:
-destination "platform=macOS" \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
name: ${{ matrix.name }}
path: test_output
scheme_name: Flare
filename: ${{ matrix.name }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}

iOS:
name: ${{ matrix.name }}
Expand Down Expand Up @@ -100,10 +86,12 @@ jobs:
-testPlan AllTests \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- uses: actions/upload-artifact@v4
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
name: ${{ matrix.name }}
path: test_output
scheme_name: Flare
filename: ${{ matrix.name }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}

tvOS:
name: ${{ matrix.name }}
Expand Down Expand Up @@ -138,7 +126,7 @@ jobs:
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report.yml
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
Expand Down Expand Up @@ -180,16 +168,12 @@ jobs:
-testPlan UnitTests \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
name: ${{ matrix.name }}
path: test_output
scheme_name: Flare
filename: ${{ matrix.name }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}

spm:
name: ${{ matrix.name }}
Expand Down
60 changes: 20 additions & 40 deletions .github/workflows/flare_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ on:
- "Tests/FlareUITests/**"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: sinoru/actions-swiftlint@v6
with:
args: --strict
env:
DIFF_BASE: ${{ github.base_ref }}
macOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
Expand Down Expand Up @@ -57,16 +47,12 @@ jobs:
-destination "platform=macOS" \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: test_output
scheme_name: FlareUI
filename: ${{ matrix.name }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}

iOS:
name: ${{ matrix.name }}
Expand Down Expand Up @@ -100,10 +86,12 @@ jobs:
-testPlan FlareUI \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- uses: actions/upload-artifact@v4
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
name: ${{ matrix.name }}
path: test_output
scheme_name: FlareUI
filename: ${{ matrix.name }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}

tvOS:
name: ${{ matrix.name }}
Expand Down Expand Up @@ -137,16 +125,12 @@ jobs:
-testPlan FlareUI \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
name: ${{ matrix.name }}
path: test_output
scheme_name: FlareUI
filename: ${{ matrix.name }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}

watchOS:
name: ${{ matrix.name }}
Expand Down Expand Up @@ -184,16 +168,12 @@ jobs:
-testPlan FlareUI \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: test_output
scheme_name: FlareUI
filename: ${{ matrix.name }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}

spm:
name: ${{ matrix.name }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "swiftlint"

on:
push:
branches:
- main
- dev
pull_request:
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "Package@swift-5.7.swift"
- "Package@swift-5.8.swift"
- "Package.swift"
- "Source/**"
- "Tests/**"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
with:
args: lint --config ./.swiftlint.yml --strict

0 comments on commit e5b8cd5

Please sign in to comment.