Skip to content

Commit

Permalink
Added github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pawello2222 committed Jul 13, 2023
1 parent fc067bd commit 3619052
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: lint

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

jobs:
swiftlint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: SwiftLint
uses: norio-nomura/[email protected]
32 changes: 32 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: swift

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

env:
LCOV_PATH: .build/artifacts/info.lcov
BUILD_FOLDER: .build/debug/AppliablePackageTests.xctest/Contents/MacOS/AppliablePackageTests
PROFDATA_FOLDER: .build/debug/codecov/default.profdata

jobs:
test:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Test
run: |
swift test --enable-code-coverage
xcrun llvm-cov report $BUILD_FOLDER -instr-profile $PROFDATA_FOLDER
xcrun llvm-cov export -format="lcov" $BUILD_FOLDER -instr-profile $PROFDATA_FOLDER > $LCOV_PATH
- name: Upload Coverage Data
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ env.LCOV_PATH }}

0 comments on commit 3619052

Please sign in to comment.