-
Notifications
You must be signed in to change notification settings - Fork 125
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
5fb3fe6
commit 977c64f
Showing
9 changed files
with
106 additions
and
3 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
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,94 @@ | ||
name: 'Encryption Rotation Tool' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- v3 | ||
- pmm-* | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
|
||
pull_request: | ||
paths-ignore: | ||
- "admin/**" | ||
- "agent/**" | ||
- "api-tests/**" | ||
- "cli-tests/**" | ||
- "docs/**" | ||
- "managed/**" | ||
- "qan-api2/**" | ||
- "update/**" | ||
- "vmproxy/**" | ||
- "ui/**" | ||
|
||
jobs: | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-22.04 | ||
|
||
continue-on-error: true | ||
|
||
env: | ||
|
||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }}/encryption-rotation | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go release | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: ${{ github.workspace }}/go.mod | ||
cache: false | ||
|
||
- name: Enable Go build cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/go-build | ||
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }} | ||
restore-keys: | | ||
${{ runner.os }}-go-build-${{ github.ref }}- | ||
${{ runner.os }}-go-build- | ||
- name: Enable Go modules cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go-modules- | ||
|
||
- name: Download Go modules | ||
run: go mod download -x | ||
|
||
- name: Build and install | ||
run: make install | ||
|
||
- name: Launch containers | ||
env: | ||
ENV_UP_FLAGS: "--detach" | ||
run: make env-up | ||
|
||
- name: Run tests | ||
run: go test ./... | ||
|
||
- name: Upload coverage results | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
file: cover.out | ||
flags: agent | ||
env_vars: MYSQL_IMAGE,MONGO_IMAGE,POSTGRES_IMAGE,PMM_SERVER_IMAGE | ||
fail_ci_if_error: false | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Run debug commands on failure | ||
if: ${{ failure() }} | ||
run: | | ||
echo "--- Environment variables ---" | ||
env | sort | ||
echo "--- GO Environment ---" | ||
go env | sort | ||
git status |
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
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
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