feat(ydbcp): support ttl for backups #11
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
name: Run YDBCP tests | |
on: | |
pull_request: | |
branches: [main] | |
types: [opened, synchronize, reopened] | |
jobs: | |
unittest: | |
runs-on: ubuntu-latest | |
outputs: | |
job-summary: ${{ steps.job-summary.outputs.job-summary }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Cache go modules | |
uses: magnetikonline/action-golang-cache@v5 | |
with: | |
go-version-file: go.mod | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Install proto plugins | |
run: | | |
go install google.golang.org/protobuf/cmd/[email protected] | |
go install google.golang.org/grpc/cmd/[email protected] | |
- name: Compile protos | |
run: make proto | |
- name: Build | |
run: | | |
go mod tidy | |
go build -v ./... | |
- name: Test | |
uses: robherley/[email protected] | |
with: | |
testArguments: './... -race --timeout=10s' | |
- name: Generate summary | |
uses: austenstone/[email protected] | |
id: job-summary | |
with: | |
create-pdf: false | |
comment-pr: | |
runs-on: ubuntu-latest | |
needs: unittest | |
steps: | |
- name: Comment on PR | |
uses: peter-evans/create-or-update-comment@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ github.repository }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: ${{ needs.unittest.outputs.job-summary }} | |
integration-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: supply with s3 access keys | |
run: | | |
echo "ydbcp" > access_key | |
echo "password" > secret_key | |
- name: docker compose up | |
run: | | |
docker compose up --build -d | |
- name: run integration tests | |
run: docker exec local-ydbcp sh -c './integration' | |
- name: docker compose down | |
run: | | |
docker compose down |