mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 00:03:23 -04:00
Run pgperltidy in github actions
Just as we use pgindent to validate that our c files conform to postgres coding standards, we also run pgperltidy to do the same for perl files. We only run it on our own code in contrib/pg_tde/ This doesn't actually run pgperltidy as we need to inject some options in a way that didn't seem possible in that script. Instead it does the same thing with some slight changes. We also bump the ubuntu version for this google actions job to the newest LTS as the older ubuntu version seems to have a version of perltidy that doesn't support the options used by pgperltidy.
This commit is contained in:
parent
71da1f03f2
commit
681b9ff1cd
7
.github/workflows/pgindent.yml
vendored
7
.github/workflows/pgindent.yml
vendored
@ -10,7 +10,7 @@ defaults:
|
||||
jobs:
|
||||
check:
|
||||
name: Check
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
@ -26,6 +26,9 @@ jobs:
|
||||
|
||||
- name: Update typedefs
|
||||
run: ci_scripts/dump-typedefs.sh
|
||||
|
||||
|
||||
- name: Run pgindent
|
||||
run: ci_scripts/run-pgindent.sh --check --diff
|
||||
|
||||
- name: Run pgperltidy
|
||||
run: ci_scripts/run-pgperltidy.sh --assert-tidy --standard-error-output
|
||||
|
8
ci_scripts/run-pgperltidy.sh
Executable file
8
ci_scripts/run-pgperltidy.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"
|
||||
cd "$SCRIPT_DIR/../"
|
||||
|
||||
source src/tools/perlcheck/find_perl_files
|
||||
|
||||
find_perl_files contrib/pg_tde/ | xargs perltidy "$@" --profile=src/tools/pgindent/perltidyrc
|
@ -43,6 +43,8 @@ DEPS=(
|
||||
python3-pykmip
|
||||
libhttp-server-simple-perl
|
||||
lcov
|
||||
# Run pgperltidy
|
||||
perltidy
|
||||
)
|
||||
|
||||
sudo apt-get update
|
||||
|
Loading…
x
Reference in New Issue
Block a user