forked from prometheus-community/postgres_exporter
-
Notifications
You must be signed in to change notification settings - Fork 12
PMM-7806: add compatibility with percona pg exporter #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cbd7ace
add compatibility with old exporter
ritbl e4258fe
add docker compose and SSL serts
ritbl 46b20fc
add tools
ritbl 0dc3950
remove common-check_license
ritbl 9b2058d
cleanup
ritbl 8cbe0d6
change to manual mode
ritbl fe3a5dd
remove yamllint
ritbl 318af7c
remove tip
ritbl 074ad4a
add PG 13 and 14 to build matrix
ritbl ceb3788
add configs
ritbl 60adc4c
up
ritbl 675b953
style
ritbl f4f2499
cleanup
ritbl 6082c4e
fix test
ritbl c18424f
style
ritbl c09bffd
style
ritbl d6f75c3
review request
ritbl c9adb32
mod tidy
ritbl 7124736
revert DSN pg change
ritbl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
go-version: | ||
- 1.17 | ||
postgresql-image: | ||
- postgres:10 | ||
- postgres:11 | ||
- postgres:12 | ||
include: | ||
- go-version: tip | ||
os: ubuntu-latest | ||
postgresql-image: postgres:12 | ||
may-fail: true | ||
runs-on: ubuntu-latest | ||
# The environment this job references | ||
environment: | ||
name: CI | ||
steps: | ||
- name: Set up Go release | ||
if: matrix.go-version != 'tip' | ||
uses: percona-platform/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Set up Go tip | ||
if: matrix.go-version == 'tip' | ||
env: | ||
# to avoid error due to `go version` accepting -v flag with an argument since 1.15 | ||
GOFLAGS: "" | ||
run: | | ||
git clone --depth=1 https://go.googlesource.com/go $HOME/gotip | ||
cd $HOME/gotip/src | ||
./make.bash | ||
echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV | ||
echo "$HOME/gotip/bin" >> $GITHUB_PATH | ||
- name: Checkout code | ||
uses: percona-platform/checkout@v2 | ||
- name: Run checks | ||
run: | | ||
go build -modfile=tools/go.mod -o bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint | ||
go build -modfile=tools/go.mod -o bin/reviewdog github.com/reviewdog/reviewdog/cmd/reviewdog | ||
bin/golangci-lint run -c=.golangci-required.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-check | ||
bin/golangci-lint run -c=.golangci.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-review | ||
- name: Run Tests | ||
run: | | ||
sudo chown 999:999 testdata/ssl/server/* | ||
sudo chmod 600 testdata/ssl/server/* | ||
docker-compose up -d | ||
make | ||
make test | ||
env: | ||
POSTGRESQL_IMAGE: ${{ matrix.postgresql-image }} | ||
- name: Run debug commands on failure | ||
if: ${{ failure() }} | ||
run: | | ||
env | ||
go version | ||
go env | ||
pwd | ||
git status | ||
docker --version | ||
docker-compose --version | ||
docker-compose logs |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we extract running checks to a separate job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took it from the original, exporter. We can think about some generic actions in scope of other task and PR, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you create a task for it then, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please clarify what exactly this ticket should be about? Create shared GHA for checks (ie linters)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extracting checks to a separate job.