Skip to content

Fix Doc GH Action

Fix Doc GH Action #109

Workflow file for this run

name: Build, tests & soundness checks
on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
swift-bedrock-library-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build
run: swift build --configuration release
swift-bedrock-library-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Tests
run: swift test
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
with:
license_header_check_enabled: true
license_header_check_project_name: "Swift Bedrock Library"
shell_check_enabled: false
python_lint_check_enabled: false
# do not use this sub-action because the build requires
# libssl-dev which is not installed on swift:6.2-noble
# Using swift:6.2-amazonlinux2 is not a solution
# because the @checkout action doesn't works on ALI2 (requires Node.js 20)
# will re-enable when Amazon Linux 2023 will be available
api_breakage_check_enabled: false
api_breakage_check_container_image: "swift:6.2-noble"
# disabled because images needs libssl-dev (which excludes swift:6.2-noble)
# and Node 20+ (for the checkout action), whcih excludes Amazon Linux 2
# will re-enable when Amazon Linux 2023 will be available
docs_check_enabled: false
docs_check_container_image: "swift:6.2-amazonlinux2"
format_check_enabled: true
format_check_container_image: "swift:6.2-noble"
yamllint_check_enabled: true
# api-breakage-check:
# name: API breakage check
# runs-on: ubuntu-latest
# timeout-minutes: 20
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# # This is set to true since swift package diagnose-api-breaking-changes is
# # cloning the repo again and without it being set to true this job won't work for
# # private repos.
# persist-credentials: true
# submodules: true
# fetch-tags: true
# fetch-depth: 0 # Fetching tags requires fetch-depth: 0 (https://github.com/actions/checkout/issues/1471)
# - name: Mark the workspace as safe
# # https://github.com/actions/checkout/issues/766
# run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
# - name: Run API breakage check
# shell: bash
# run: |
# git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
# BASELINE_REF='pull-base-ref'
# echo "Using baseline: $BASELINE_REF"
# swift package diagnose-api-breaking-changes "$BASELINE_REF"
integration-tests:
name: Integration Tests
uses: ./.github/workflows/integration_tests.yml
with:
name: "Integration tests"
examples_enabled: true
matrix_linux_command: "swift build"
# We pass the list of examples here, but we can't pass an array as argument
# Instead, we pass a String with a valid JSON array.
# The workaround is mentioned here https://github.com/orgs/community/discussions/11692
examples: "[ 'api-key', 'converse', 'converse-stream', 'embeddings', 'openai', 'text_chat' ]"
swift-6-language-mode:
name: Swift 6 Language Mode
uses: ./.github/workflows/swift-6-language-mode.yml
check-foundation:
name: No dependencies on Foundation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Mark the workspace as safe
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Check for Foundation or ICU dependency
run: |
.github/workflows/scripts/check-link-foundation.sh