mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-07 21:09:14 +00:00
Compare commits
1 Commits
05b7efcd27
...
PMM-7-ci-p
Author | SHA1 | Date | |
---|---|---|---|
![]() |
25c4dd2b92 |
34
.github/workflows/go.yml
vendored
Normal file
34
.github/workflows/go.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Go
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 3.x
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 3.x
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '1.23'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: go mod download
|
||||||
|
working-directory: src/go
|
||||||
|
|
||||||
|
- name: Setup environment
|
||||||
|
run: make env-up
|
||||||
|
working-directory: src/go
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: go test ./...
|
||||||
|
working-directory: src/go
|
8
.github/workflows/toolkit.yml
vendored
8
.github/workflows/toolkit.yml
vendored
@@ -20,12 +20,14 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.22'
|
go-version: '1.23'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cd src/go; make linux-amd64; cd ../../
|
working-directory: src/go
|
||||||
|
run: make linux-amd64
|
||||||
|
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: echo "FROM oraclelinux:9-slim" > Dockerfile; echo "RUN microdnf -y update" >> Dockerfile; echo "COPY bin/* /usr/bin/" >> Dockerfile; docker build . --file Dockerfile --tag percona-toolkit:${{ github.sha }}
|
run: docker build . --file Dockerfile --tag percona-toolkit:${{ github.sha }}
|
||||||
- name: Run Trivy vulnerability scanner
|
- name: Run Trivy vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@0.29.0
|
uses: aquasecurity/trivy-action@0.29.0
|
||||||
with:
|
with:
|
||||||
|
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM oraclelinux:9-slim
|
||||||
|
RUN microdnf -y update
|
||||||
|
COPY bin/* /usr/bin/
|
@@ -173,7 +173,7 @@ test: ## Run tests
|
|||||||
|
|
||||||
format: ## Format source code.
|
format: ## Format source code.
|
||||||
gofumpt -w -s $(FILES)
|
gofumpt -w -s $(FILES)
|
||||||
gofumports -local github.com/percona/pmm-managed -l -w $(FILES)
|
gofumports -local github.com/percona/percona-toolkit -l -w $(FILES)
|
||||||
|
|
||||||
vet: ## Run vet on Go code
|
vet: ## Run vet on Go code
|
||||||
@echo ">> vetting code"
|
@echo ">> vetting code"
|
||||||
|
Reference in New Issue
Block a user