Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,18 @@ jobs:
shell_check_enabled: false
yamllint_check_enabled: false
python_lint_check_enabled: false

required:
needs:
- tests_with_docker_embedded_swift
- tests_with_docker
- tests_without_docker
- tests_macos
- build_tests_ios
- soundness
- proposal_validation
- soundness-docs
runs-on: ubuntu-latest
steps:
- name: Success
run: echo "All required jobs succeeded."
6 changes: 3 additions & 3 deletions .github/workflows/scripts/check-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ done

if [ -z "${docs_targets}" ] ; then
if [ ! -f .spi.yml ]; then
log "No '.spi.yml' found, no documentation targets to check."
log "No '.spi.yml' found in \"$(pwd)\", no documentation targets to check."
exit 0
fi
fi
Expand All @@ -94,12 +94,12 @@ if ! command -v yq &> /dev/null; then
fi

if [ -z "${docs_targets}" ] ; then
docs_targets=$(yq ".builder.configs[] | select(.documentation_targets[] != \"\") | .documentation_targets[]" .spi.yml)
docs_targets=$(yq -r ".builder.configs[] | select(.documentation_targets[] != \"\") | .documentation_targets[]" .spi.yml)
fi

package_files=$(find . -maxdepth 1 -name 'Package*.swift')
if [ -z "$package_files" ]; then
fatal "Package.swift not found. Please ensure you are running this script from the root of a Swift package."
fatal "Package.swift not found in \"$(pwd)\". Please ensure you are running this script from the root of a Swift package."
fi

# yq 3.1.0-3 doesn't have filter, otherwise we could replace the grep call with "filter(.identity == "swift-docc-plugin") | keys | .[]"
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/soundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ on:
api_breakage_check_container_image:
type: string
description: "Container image for the API breakage check job. Defaults to latest Swift Ubuntu image."
default: "swift:6.2-noble"
default: "swift:6.3-noble"
docs_check_enabled:
type: boolean
description: "Boolean to enable the docs check job. Defaults to true."
default: true
docs_check_container_image:
type: string
description: "Container image for the docs check job. Defaults to latest Swift Ubuntu image."
default: "swift:6.2-noble"
default: "swift:6.3-noble"
docs_check_additional_arguments:
type: string
description: "Additional arguments that should be passed to docc"
Expand Down Expand Up @@ -94,7 +94,7 @@ on:
format_check_container_image:
type: string
description: "Container image for the format check job. Defaults to latest Swift Ubuntu image."
default: "swift:6.2-noble"
default: "swift:6.3-noble"
shell_check_enabled:
type: boolean
description: "Boolean to enable the shell check job. Defaults to true."
Expand Down Expand Up @@ -200,23 +200,21 @@ jobs:
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Pre-build
if: ${{ inputs.linux_pre_build_command }}
# zizmor: ignore[template-injection]
run: ${{ inputs.linux_pre_build_command }}
- name: Run documentation check
env:
ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_additional_arguments }}
DOCC_ANALYZE: ${{ inputs.docs_check_analyze }}
DOCS_TARGETS: ${{ inputs.docs_check_targets}}
SCRIPT_ROOT: ${{ steps.script_path.outputs.root }}
run: |
set -x
${{ inputs.linux_pre_build_command }}
analyze_arg=""
doc_target_arg=""
if [[ "${DOCS_TARGETS}" != "" ]] ; then
if [ "${DOCS_TARGETS}" != "" ] ; then
doc_target_arg="--doc-targets ${DOCS_TARGETS}"
fi
if [[ "${DOCC_ANALYZE}" != "true" ]]; then
if [ "${DOCC_ANALYZE}" != "true" ]; then
analyze_arg="--no-analyze"
fi
"${SCRIPT_ROOT}/.github/workflows/scripts/check-docs.sh" ${analyze_arg} ${doc_target_arg} --additional-docc-arguments ${ADDITIONAL_DOCC_ARGUMENTS}
Expand Down Expand Up @@ -263,12 +261,13 @@ jobs:
run: |
analyze_arg=""
doc_target_arg=""
if [[ "${DOCS_TARGETS}" != "" ]] ; then
if [ "${DOCS_TARGETS}" != "" ] ; then
doc_target_arg="--doc-targets ${DOCS_TARGETS}"
fi
if [[ "${DOCC_ANALYZE}" != "true" ]]; then
if [ "${DOCC_ANALYZE}" != "true" ]; then
analyze_arg="--no-analyze"
fi
set -x
"${SCRIPT_ROOT}/.github/workflows/scripts/check-docs.sh" ${analyze_arg} ${doc_target_arg} --additional-docc-arguments ${ADDITIONAL_DOCC_ARGUMENTS}

unacceptable-language-check:
Expand Down
Loading