Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .github/actions/broken-symlinks-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: broken-symlink-check
description: Check for broken symbolic links
runs:
using: composite
steps:
- name: Run broken symlink check
shell: bash
run: $GITHUB_ACTION_PATH/check-broken-symlinks.sh
8 changes: 8 additions & 0 deletions .github/actions/check-unacceptable-language/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: check-unacceptable-language
description: Check Language Format
runs:
using: composite
steps:
- name: Run unacceptable language check
shell: bash
run: $GITHUB_ACTION_PATH/check-unacceptable-language.sh
8 changes: 8 additions & 0 deletions .github/actions/docs-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: docs-check
description: Check Docs
runs:
using: composite
steps:
- name: Run docs check
shell: bash
run: $GITHUB_ACTION_PATH/check-docs.sh
8 changes: 8 additions & 0 deletions .github/actions/format-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: format-check
description: Check Swift Format
runs:
using: composite
steps:
- name: Run format check
shell: bash
run: $GITHUB_ACTION_PATH/check-swift-format.sh
8 changes: 8 additions & 0 deletions .github/actions/license-header-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: license-header-check
description: Check License Headers
runs:
using: composite
steps:
- name: Run license header check
shell: bash
run: $GITHUB_ACTION_PATH/check-license-header.sh
14 changes: 14 additions & 0 deletions .github/actions/python-lint-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: python-lint-check
description: Check python files
runs:
using: composite
steps:
- name: Install flake
shell: bash
run: pip3 install flake8 flake8-import-order
- name: Copy flake8 config
shell: bash
run: cp $GITHUB_ACTION_PATH/.flake8 .flake8
- name: Run flake8
shell: bash
run: flake8
11 changes: 11 additions & 0 deletions .github/actions/yamllint-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: yamllint-check
description: Check yaml files
runs:
using: composite
steps:
- name: Install yamllint
shell: bash
run: which yamllint || (apt -q update && apt install -yq yamllint)
- name: Run yaml lint
shell: bash
run: yamllint --strict --config-file $GITHUB_ACTION_PATH/yamllint.yml .
162 changes: 18 additions & 144 deletions .github/workflows/soundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
timeout-minutes: 40
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
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
Expand Down Expand Up @@ -158,31 +158,17 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Pre-build
if: ${{ inputs.linux_pre_build_command }}
run: ${{ inputs.linux_pre_build_command }}
- name: Run documentation check
env:
ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_additional_arguments }}
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh
uses: ./.github/actions/docs-check

docs-check-macos:
name: Documentation check (macOS)
Expand All @@ -191,24 +177,10 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Select Xcode
run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ inputs.docs_check_macos_xcode_version }}.app" >> $GITHUB_ENV
- name: Swift version
Expand All @@ -218,7 +190,7 @@ jobs:
- name: Run documentation check
env:
ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_macos_additional_arguments }}
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh
uses: ./.github/actions/docs-check

unacceptable-language-check:
name: Unacceptable language check
Expand All @@ -227,28 +199,14 @@ jobs:
timeout-minutes: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Run unacceptable language check
env:
UNACCEPTABLE_WORD_LIST: ${{ inputs.unacceptable_language_check_word_list}}
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-unacceptable-language.sh
uses: ./.github/actions/check-unacceptable-language

license-header-check:
name: License headers check
Expand All @@ -257,28 +215,14 @@ jobs:
timeout-minutes: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Run license header check
env:
PROJECT_NAME: ${{ inputs.license_header_check_project_name }}
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-license-header.sh
uses: ./.github/actions/license-header-check

broken-symlink-check:
name: Broken symlinks check
Expand All @@ -287,26 +231,12 @@ jobs:
timeout-minutes: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Run broken symlinks check
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-broken-symlinks.sh
uses: ./.github/actions/broken-symlinks-check

format-check:
name: Format check
Expand All @@ -317,29 +247,15 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Mark the workspace as safe
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Run format check
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-swift-format.sh
uses: ./.github/actions/format-check

shell-check:
name: Shell check
Expand All @@ -352,7 +268,7 @@ jobs:
- name: Install git
run: which git || (apt -q update && apt -yq install git)
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
Expand All @@ -371,33 +287,12 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Run yamllint
run: |
which yamllint || (apt -q update && apt install -yq yamllint)
cd ${GITHUB_WORKSPACE}
if [ ! -f ".yamllint.yml" ]; then
echo "Downloading default yamllint config file"
cat ${{ steps.script_path.outputs.root }}/.github/workflows/configs/yamllint.yml > .yamllint.yml
fi
yamllint --strict --config-file .yamllint.yml .
uses: ./.github/actions/yamllint-check

python-lint-check:
name: Python lint check
Expand All @@ -406,30 +301,9 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: true
- name: Checkout swiftlang/github-workflows repository
if: ${{ github.repository != 'swiftlang/github-workflows' }}
uses: actions/checkout@v4
with:
repository: swiftlang/github-workflows
path: github-workflows
- name: Determine script-root path
id: script_path
run: |
if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then
echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT
else
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Run flake8
run: |
pip3 install flake8 flake8-import-order
cd ${GITHUB_WORKSPACE}
if [ ! -f ".flake8" ]; then
echo "Downloading default flake8 config file"
cat ${{ steps.script_path.outputs.root }}/.github/workflows/configs/.flake8 > .flake8
fi
flake8
uses: ./.github/actions/python-lint-check
2 changes: 1 addition & 1 deletion .licenseignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.github/workflows/configs/.flake8
.github/actions/python-lint-check/.flake8
**/*.yml
CODEOWNERS
LICENSE.txt
Expand Down