-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91b4e43
commit a37e1d3
Showing
4 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Checks | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
cppcheck: | ||
name: Cppcheck | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
path: src/percona_pg_telemetry | ||
|
||
- name: Checkout cppcheck sources | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "danmar/cppcheck" | ||
ref: "2.13.4" | ||
path: src/cppcheck | ||
|
||
- name: Build and install cppcheck | ||
working-directory: src/cppcheck | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . | ||
sudo cmake --install . | ||
- name: Execute linter check with cppcheck | ||
working-directory: src/percona_pg_telemetry | ||
run: | | ||
set -x | ||
cppcheck --enable=all --inline-suppr --template='{file}:{line},{severity},{id},{message}' --error-exitcode=1 --suppress=missingIncludeSystem --suppress=missingInclude --suppress=unmatchedSuppression:percona_pg_telemetry.c --check-config . | ||
format: | ||
name: Format | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Clone postgres repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'postgres/postgres' | ||
ref: 'REL_17_STABLE' | ||
|
||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
path: 'contrib/percona_pg_telemetry' | ||
|
||
- name: Configure postgres | ||
run: ./configure | ||
|
||
- name: Install perltidy | ||
run: sudo cpan -T SHANCOCK/Perl-Tidy-20230309.tar.gz | ||
|
||
- name: Install pg_bsd_indent | ||
working-directory: src/tools/pg_bsd_indent | ||
run: sudo make install | ||
|
||
- name: Add pg_bsd_indent and pgindent to path | ||
run: | | ||
echo "/usr/local/pgsql/bin" >> $GITHUB_PATH | ||
echo "${{ github.workspace }}/src/tools/pgindent" >> $GITHUB_PATH | ||
- name: Format sources | ||
working-directory: contrib/percona_pg_telemetry | ||
run: | | ||
make update-typedefs | ||
make indent | ||
- name: Check files are formatted and no source code changes | ||
working-directory: contrib/percona_pg_telemetry | ||
run: | | ||
git status | ||
git diff --exit-code | ||
license: | ||
name: License | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check license headers | ||
uses: apache/skywalking-eyes/[email protected] | ||
with: | ||
token: "" # Prevent comments |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,6 @@ | |
## .vscode | ||
.vscode/ | ||
.vscode/* | ||
|
||
# tools files | ||
typedefs-full.list |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PTDatabaseInfo | ||
PTExtensionInfo | ||
PTSetttingsInfo | ||
PTSharedState |