Update Functions.swift #219
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: '*' | |
merge_group: | |
branches: [ main ] | |
env: | |
CI_XCODE: '/Applications/Xcode_15.0.app/Contents/Developer' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
spm-test: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use multiple cores | |
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1 | |
- name: Lint | |
run: set -o pipefail && env NSUnbufferedIO=YES swiftlint --strict | |
- name: Build and Test | |
run: set -o pipefail && env NSUnbufferedIO=YES swift test --enable-code-coverage | xcpretty -c | |
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE }} | |
- name: Prepare codecov | |
uses: sersoft-gmbh/swift-coverage-action@v4 | |
id: coverage-files | |
with: | |
format: lcov | |
search-paths: ./.build | |
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}} | |
env_vars: SPM | |
fail_ci_if_error: true | |
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE }} | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: sersoft-gmbh/SwiftyActions@v3 | |
with: | |
release-version: "5" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Test | |
run: set -o pipefail && env NSUnbufferedIO=YES swift test --enable-test-discovery --enable-code-coverage | |
- name: Update codecov config | |
run: cat .codecov.yml | curl --data-binary @- https://codecov.io/validate | |
- name: Prepare codecov | |
run: | | |
llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/debug/ParseServerSwiftPackageTests.xctest -instr-profile .build/x86_64-unknown-linux-gnu/debug/codecov/default.profdata > info_linux.lcov | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
env_vars: LINUX | |
fail_ci_if_error: true | |
docs: | |
timeout-minutes: 20 | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use multiple cores | |
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1 | |
- name: Generate Docs | |
run: set -o pipefail && env NSUnbufferedIO=YES Scripts/generate-documentation | |
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE }} |