Bump gitpython from 3.1.44 to 3.1.45 #980
Workflow file for this run
This file contains hidden or 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: Check ClangFormat Configuration | |
# See: https://docs.github.com/actions/reference/workflows-and-actions/events-that-trigger-workflows | |
on: | |
push: | |
paths: | |
- ".github/workflows/check-clang-format.yml" | |
- "other/clang-format-configuration/scripts/convert-clang-format-configuration.js" | |
- "other/clang-format-configuration/testdata/**" | |
- "other/clang-format-configuration/.clang-format" | |
- ".npmrc" | |
- "go.mod" | |
- "go.sum" | |
- "package.json" | |
- "package-lock.json" | |
- "Taskfile.ya?ml" | |
pull_request: | |
paths: | |
- ".github/workflows/check-clang-format.yml" | |
- "other/clang-format-configuration/scripts/convert-clang-format-configuration.js" | |
- "other/clang-format-configuration/testdata/**" | |
- "other/clang-format-configuration/.clang-format" | |
- ".npmrc" | |
- "go.mod" | |
- "go.sum" | |
- "package.json" | |
- "package-lock.json" | |
- "Taskfile.ya?ml" | |
schedule: | |
# Run periodically to catch breakage caused by external changes. | |
- cron: "0 17 * * WED" | |
workflow_dispatch: | |
inputs: | |
clang-format-version: | |
description: ClangFormat version (leave empty for standard version) | |
type: string | |
default: "" | |
required: false | |
repository_dispatch: | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Install Go | |
uses: actions/setup-go@v6 | |
with: | |
go-version-file: go.mod | |
- name: Setup Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version-file: package.json | |
- name: Validate ClangFormat configuration files | |
run: | | |
go tool \ | |
github.com/go-task/task/v3/cmd/task \ | |
--silent \ | |
clang-format:validate | |
check-config: | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Install Go | |
uses: actions/setup-go@v6 | |
with: | |
go-version-file: go.mod | |
- name: Set environment variables | |
run: | | |
# See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable | |
if [[ "${{ github.event.inputs.clang-format-version }}" == "" ]]; then | |
echo "CLANG_FORMAT_VERSION=$( | |
go tool \ | |
github.com/go-task/task/v3/cmd/task clang-format:get-version | |
)" >>"$GITHUB_ENV" | |
else | |
echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >>"$GITHUB_ENV" | |
fi | |
echo "CLANG_FORMAT_INSTALL_PATH=${{ runner.temp }}/clang-format" >>"$GITHUB_ENV" | |
echo "WORKING_FOLDER=${{ runner.temp }}" >>"$GITHUB_ENV" | |
- name: Download ClangFormat | |
id: download-clang-format | |
uses: MrOctopus/[email protected] | |
with: | |
repository: arduino/clang-static-binaries | |
tag: ${{ env.CLANG_FORMAT_VERSION }} | |
asset: clang-format_${{ env.CLANG_FORMAT_VERSION }}_Linux_64bit.tar.bz2 | |
target: ${{ env.CLANG_FORMAT_INSTALL_PATH }} | |
- name: Install ClangFormat | |
run: | | |
cd "${{ env.CLANG_FORMAT_INSTALL_PATH }}" | |
tar \ | |
--extract \ | |
--file="${{ steps.download-clang-format.outputs.name }}" | |
# Add installation to PATH: | |
# See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#adding-a-system-path | |
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >>"$GITHUB_PATH" | |
- name: Check ClangFormat configuration file | |
id: check | |
run: | | |
go tool \ | |
github.com/go-task/task/v3/cmd/task \ | |
--silent \ | |
clang-format:check-config \ | |
CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}" | |
- name: Save effective configuration file to a workflow artifact | |
if: > | |
always() && | |
steps.check.outcome == 'failure' | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.WORKING_FOLDER }}/expected/.clang-format | |
if-no-files-found: error | |
name: config-output | |
check-output: | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Install Go | |
uses: actions/setup-go@v6 | |
with: | |
go-version-file: go.mod | |
- name: Set environment variables | |
run: | | |
# See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable | |
if [[ "${{ github.event.inputs.clang-format-version }}" == "" ]]; then | |
echo "CLANG_FORMAT_VERSION=$( | |
go tool \ | |
github.com/go-task/task/v3/cmd/task clang-format:get-version | |
)" >>"$GITHUB_ENV" | |
else | |
echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >>"$GITHUB_ENV" | |
fi | |
echo "CLANG_FORMAT_INSTALL_PATH=${{ runner.temp }}/clang-format" >>"$GITHUB_ENV" | |
echo "WORKING_FOLDER=${{ runner.temp }}" >>"$GITHUB_ENV" | |
- name: Download ClangFormat | |
id: download | |
uses: MrOctopus/[email protected] | |
with: | |
repository: arduino/clang-static-binaries | |
tag: ${{ env.CLANG_FORMAT_VERSION }} | |
asset: clang-format_${{ env.CLANG_FORMAT_VERSION }}_Linux_64bit.tar.bz2 | |
target: ${{ env.CLANG_FORMAT_INSTALL_PATH }} | |
- name: Install ClangFormat | |
run: | | |
cd "${{ env.CLANG_FORMAT_INSTALL_PATH }}" | |
tar \ | |
--extract \ | |
--file="${{ steps.download.outputs.name }}" | |
# Add installation to PATH: | |
# See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#adding-a-system-path | |
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >>"$GITHUB_PATH" | |
- name: Check ClangFormat output | |
id: check | |
run: | | |
go tool \ | |
github.com/go-task/task/v3/cmd/task \ | |
clang-format:check-output \ | |
CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}" \ | |
WORKING_FOLDER="${{ env.WORKING_FOLDER }}" | |
- name: Save formatted test data to a workflow artifact | |
if: > | |
always() && | |
steps.check.outcome == 'failure' | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.WORKING_FOLDER }}/output | |
if-no-files-found: error | |
name: testdata-output | |
check-testdata: | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Install Go | |
uses: actions/setup-go@v6 | |
with: | |
go-version-file: go.mod | |
- name: Check ClangFormat test data | |
run: | | |
go tool \ | |
github.com/go-task/task/v3/cmd/task \ | |
--silent \ | |
clang-format:check-testdata | |
convert: | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Set environment variables | |
run: | | |
# See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable | |
echo "CONVERSION_OUTPUT_PATH=${{ runner.temp }}/clang-format-js-object.txt" >>"$GITHUB_ENV" | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Setup Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version-file: package.json | |
- name: Install Go | |
uses: actions/setup-go@v6 | |
with: | |
go-version-file: go.mod | |
- name: Convert the ClangFormat configuration | |
run: | | |
go tool \ | |
github.com/go-task/task/v3/cmd/task \ | |
--silent \ | |
clang-format:convert \ | |
OUTPUT_PATH="${{ env.CONVERSION_OUTPUT_PATH }}" | |
- name: Save conversion to a workflow artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.CONVERSION_OUTPUT_PATH }} | |
if-no-files-found: error | |
name: javascript-configuration-object |