mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 02:53:51 +08:00
Add Perl code check GitHub action
Add a run of `perltidy` to make sure that all the Perl code is correctly formatted. Also fix the formatting of one file that did not follow the style in `scripts/perltidyrc`.
This commit is contained in:
parent
80b915d001
commit
551ac56937
12
.github/workflows/code_style.yaml
vendored
12
.github/workflows/code_style.yaml
vendored
@ -8,6 +8,18 @@ on:
|
||||
- prerelease_test
|
||||
pull_request:
|
||||
jobs:
|
||||
perl_checks:
|
||||
name: Check Perl code in tree
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Install prerequisites
|
||||
run: sudo apt install perltidy
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v2
|
||||
- name: Format Perl files, if needed
|
||||
run: find . -name '*.p[lm]' -exec perltidy --profile=scripts/perltidyrc {} +
|
||||
- name: Check for diff
|
||||
run: git diff --exit-code
|
||||
misc_checks:
|
||||
name: Check formatting, license and git hooks
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -32,7 +32,7 @@ sub get_new_ts_node
|
||||
{
|
||||
my ($name, $class) = @_;
|
||||
|
||||
$class //= 'TimescaleNode';
|
||||
$class //= 'TimescaleNode';
|
||||
|
||||
my $self = PostgresNode::get_new_node($name);
|
||||
$self = bless $self, $class;
|
||||
@ -48,7 +48,8 @@ sub init
|
||||
$self->SUPER::init(%kwargs);
|
||||
# append into postgresql.conf from Timescale
|
||||
# template config file
|
||||
$self->append_conf('postgresql.conf', TestLib::slurp_file("$ENV{'BUILDIR'}/tsl/test/postgresql.conf"));
|
||||
$self->append_conf('postgresql.conf',
|
||||
TestLib::slurp_file("$ENV{'BUILDIR'}/tsl/test/postgresql.conf"));
|
||||
}
|
||||
|
||||
# helper function to check output from PSQL for a query
|
||||
|
Loading…
x
Reference in New Issue
Block a user