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
13 changes: 11 additions & 2 deletions .github/workflows/check-ci-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,21 @@ jobs:
version: 3.x

- name: Sync files
run: task --silent ci:sync
run: |
task \
--silent \
ci:sync

- name: Check file duplicates sync
run: |
git add .
if ! git diff --color --exit-code HEAD; then

if
! git diff \
--color \
--exit-code \
HEAD
then
echo "::error::File duplicates are out of sync. Please run \"task fix\""
exit 1
fi
30 changes: 25 additions & 5 deletions .github/workflows/check-clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ jobs:
version: 3.x

- name: Validate ClangFormat configuration files
run: task --silent clang-format:validate
run: |
task \
--silent \
clang-format:validate

check-config:
runs-on: ubuntu-latest
Expand All @@ -79,6 +82,7 @@ jobs:
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 "YQ_INSTALL_PATH=${{ runner.temp }}/yq" >> "$GITHUB_ENV"
echo "WORKING_FOLDER=${{ runner.temp }}" >> "$GITHUB_ENV"
Expand All @@ -95,7 +99,11 @@ jobs:
- name: Install ClangFormat
run: |
cd "${{ env.CLANG_FORMAT_INSTALL_PATH }}"
tar --extract --file="${{ steps.download-clang-format.outputs.name }}"

tar \
--extract \
--file="${{ steps.download-clang-format.outputs.name }}"

# Add installation to PATH:
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >> "$GITHUB_PATH"
Expand All @@ -111,7 +119,11 @@ jobs:
- name: Install yq
run: |
cd "${{ env.YQ_INSTALL_PATH }}"
tar --extract --file="${{ steps.download-yq.outputs.name }}"

tar \
--extract \
--file="${{ steps.download-yq.outputs.name }}"

# Add installation to PATH:
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
echo "${{ env.YQ_INSTALL_PATH }}/yq" >> "$GITHUB_PATH"
Expand Down Expand Up @@ -156,6 +168,7 @@ jobs:
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"

Expand All @@ -171,7 +184,11 @@ jobs:
- name: Install ClangFormat
run: |
cd "${{ env.CLANG_FORMAT_INSTALL_PATH }}"
tar --extract --file="${{ steps.download.outputs.name }}"

tar \
--extract \
--file="${{ steps.download.outputs.name }}"

# Add installation to PATH:
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >> "$GITHUB_PATH"
Expand Down Expand Up @@ -209,7 +226,10 @@ jobs:
version: 3.x

- name: Check ClangFormat test data
run: task --silent clang-format:check-testdata
run: |
task \
--silent \
clang-format:check-testdata

convert:
runs-on: ubuntu-latest
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/check-community-health-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,21 @@ jobs:
version: 3.x

- name: Sync files
run: task --silent github:sync
run: |
task \
--silent \
github:sync

- name: Check file duplicates sync
run: |
git add .
if ! git diff --color --exit-code HEAD; then

if
! git diff \
--color \
--exit-code \
HEAD
then
echo "::error::File duplicates are out of sync. Please run \"task fix\""
exit 1
fi
13 changes: 11 additions & 2 deletions .github/workflows/check-config-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,21 @@ jobs:
version: 3.x

- name: Sync files
run: task --silent config:sync
run: |
task \
--silent \
config:sync

- name: Check file duplicates sync
run: |
git add .
if ! git diff --color --exit-code HEAD; then

if
! git diff \
--color \
--exit-code \
HEAD
then
echo "::error::File duplicates are out of sync. Please run \"task fix\""
exit 1
fi
5 changes: 4 additions & 1 deletion .github/workflows/check-eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ jobs:
version: 3.x

- name: Validate workflows
run: task --silent eslint:validate
run: |
task \
--silent \
eslint:validate
10 changes: 8 additions & 2 deletions .github/workflows/check-files-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ jobs:
version: 3.x

- name: Check filenames
run: task --silent general:check-filenames
run: |
task \
--silent \
general:check-filenames

check-symlinks:
needs: run-determination
Expand All @@ -75,4 +78,7 @@ jobs:
version: 3.x

- name: Check symlinks
run: task --silent general:check-symlinks
run: |
task \
--silent \
general:check-symlinks
16 changes: 13 additions & 3 deletions .github/workflows/check-general-formatting-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,22 @@ jobs:
- name: Install editorconfig-checker
run: |
cd "${{ env.EC_INSTALL_PATH }}"
tar --extract --file="${{ steps.download.outputs.name }}"

tar \
--extract \
--file="${{ steps.download.outputs.name }}"

# Give the binary a standard name
mv "${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" "${{ env.EC_INSTALL_PATH }}/bin/ec"
mv \
"${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" \
"${{ env.EC_INSTALL_PATH }}/bin/ec"

# Add installation to PATH:
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
echo "${{ env.EC_INSTALL_PATH }}/bin" >> "$GITHUB_PATH"

- name: Check formatting
run: task --silent general:check-formatting
run: |
task \
--silent \
general:check-formatting
20 changes: 17 additions & 3 deletions .github/workflows/check-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ jobs:
ruby-version: ruby # Install latest version

- name: Install licensee
run: gem install licensee
run: |
gem install \
licensee

- name: Check license file for ${{ matrix.check-license.path }}
run: |
Expand All @@ -95,14 +97,26 @@ jobs:
# See: https://github.com/licensee/licensee
LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)"

DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')"
DETECTED_LICENSE_FILE="$(
echo "$LICENSEE_OUTPUT" \
| \
jq .matched_files[0].filename \
| \
tr --delete '\r'
)"
echo "Detected license file: $DETECTED_LICENSE_FILE"
if [ "$DETECTED_LICENSE_FILE" != "\"${{ matrix.check-license.expected-filename }}\"" ]; then
echo "::error file=${DETECTED_LICENSE_FILE}::detected license file $DETECTED_LICENSE_FILE doesn't match expected: ${{ matrix.check-license.expected-filename }}"
EXIT_STATUS=1
fi

DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')"
DETECTED_LICENSE_TYPE="$(
echo "$LICENSEE_OUTPUT" \
| \
jq .matched_files[0].matched_license \
| \
tr --delete '\r'
)"
echo "Detected license type: $DETECTED_LICENSE_TYPE"
if [ "$DETECTED_LICENSE_TYPE" != "\"${{ matrix.check-license.expected-type }}\"" ]; then
echo "::error file=${DETECTED_LICENSE_FILE}::detected license type $DETECTED_LICENSE_TYPE doesn't match expected \"${{ matrix.check-license.expected-type }}\""
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/check-markdown-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,7 @@ jobs:
version: 3.x

- name: Check links
run: task --silent markdown:check-links
run: |
task \
--silent \
markdown:check-links
28 changes: 18 additions & 10 deletions .github/workflows/check-npm-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ jobs:
version: 3.x

- name: Validate package.json
run: task --silent npm:validate PROJECT_PATH="${{ matrix.project.path }}"
run: |
task \
--silent \
npm:validate \
PROJECT_PATH="${{ matrix.project.path }}"

check-sync:
name: check-sync (${{ matrix.project.path }})
Expand Down Expand Up @@ -113,10 +117,16 @@ jobs:
version: 3.x

- name: Install npm dependencies
run: task npm:install-deps PROJECT_PATH="${{ matrix.project.path }}"
run: |
task npm:install-deps \
PROJECT_PATH="${{ matrix.project.path }}"

- name: Check package-lock.json
run: git diff --color --exit-code "${{ matrix.project.path }}/package-lock.json"
run: |
git diff \
--color \
--exit-code \
"${{ matrix.project.path }}/package-lock.json"

check-config:
name: check-config (${{ matrix.project.path }})
Expand Down Expand Up @@ -150,14 +160,12 @@ jobs:

- name: Fix problems in npm configuration file
run: |
task \
npm:fix-config \
task npm:fix-config \
PROJECT_PATH="${{ matrix.project.path }}"

- name: Check if fixes are needed in npm configuration file
run: |
git \
diff \
--color \
--exit-code \
"${{ matrix.project.path }}/.npmrc"
git diff \
--color \
--exit-code \
"${{ matrix.project.path }}/.npmrc"
5 changes: 4 additions & 1 deletion .github/workflows/check-prettier-formatting-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,7 @@ jobs:
run: task general:format-prettier

- name: Check formatting
run: git diff --color --exit-code
run: |
git diff \
--color \
--exit-code
5 changes: 4 additions & 1 deletion .github/workflows/check-python-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,7 @@ jobs:
run: task python:format

- name: Check formatting
run: git diff --color --exit-code
run: |
git diff \
--color \
--exit-code
22 changes: 18 additions & 4 deletions .github/workflows/check-shell-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,17 @@ jobs:
- name: Install ShellCheck
run: |
cd "${{ env.INSTALL_PATH }}"
tar --extract --file="${{ steps.download.outputs.name }}"

tar \
--extract \
--file="${{ steps.download.outputs.name }}"

EXTRACTION_FOLDER="$(
basename \
"${{ steps.download.outputs.name }}" \
"${{ env.SHELLCHECK_RELEASE_ASSET_SUFFIX }}"
)"

# Add installation to PATH:
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
echo "${{ env.INSTALL_PATH }}/$EXTRACTION_FOLDER" >> "$GITHUB_PATH"
Expand Down Expand Up @@ -164,9 +169,15 @@ jobs:
- name: Install shfmt
run: |
# Executable permissions of release assets are lost
chmod +x "${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}"
chmod \
+x \
"${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}"

# Standardize binary name
mv "${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}" "${{ env.SHFMT_INSTALL_PATH }}/shfmt"
mv \
"${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}" \
"${{ env.SHFMT_INSTALL_PATH }}/shfmt"

# Add installation to PATH:
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
echo "${{ env.SHFMT_INSTALL_PATH }}" >> "$GITHUB_PATH"
Expand All @@ -179,7 +190,10 @@ jobs:
SCRIPT_PATH="${{ matrix.script }}"

- name: Check formatting
run: git diff --color --exit-code
run: |
git diff \
--color \
--exit-code

executable:
name: executable (${{ matrix.script }})
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/check-workflows-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ jobs:
version: 3.x

- name: Validate workflows
run: task --silent ci:validate
run: |
task \
--silent \
ci:validate
4 changes: 3 additions & 1 deletion .github/workflows/check-yaml-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,6 @@ jobs:

- name: Check YAML
continue-on-error: ${{ matrix.configuration.continue-on-error }}
run: task yaml:lint YAMLLINT_FORMAT=${{ matrix.configuration.format }}
run: |
task yaml:lint \
YAMLLINT_FORMAT=${{ matrix.configuration.format }}
Loading
Loading