feat: Add first class support for ParseConfig (#73) #266
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.4.app/Contents/Developer' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
spm-test: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install SwiftLint | |
run: brew install swiftlint | |
- 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@v4 | |
with: | |
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}} | |
env_vars: SPM | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
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@v4 | |
with: | |
env_vars: LINUX | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
docs: | |
timeout-minutes: 20 | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate Docs | |
run: set -o pipefail && env NSUnbufferedIO=YES Scripts/generate-documentation | |
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE }} |