Add DocC documentation #244
Workflow file for this run
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: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: "ci-${{ github.head_ref || github.run_id }}" | |
cancel-in-progress: true | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer | |
jobs: | |
build-test: | |
name: Build and Test | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache SPM | |
uses: actions/cache@v3 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm- | |
- name: Lint | |
run: swiftlint --strict --reporter github-actions-logging | |
- name: Build | |
run: swift build -Xswiftc -warnings-as-errors --build-tests | |
- name: Test | |
run: swift test --skip-build --parallel --filter TMDbTests | |
- name: Build for Release | |
run: swift build -c release -Xswiftc -warnings-as-errors | |
build-documentation: | |
name: Build Documentation | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache SPM | |
uses: actions/cache@v3 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm- | |
- name: Install markdownlint-cli | |
run: brew install markdownlint-cli | |
- name: Lint DocC files | |
run: markdownlint **/*.docc/**/*.md | |
- name: Build | |
run: swift package generate-documentation --product TMDb |