Skip to content

🤖 triggering CI on branch 'redhat-v1.5.2' after synching from upstream/v1.5.2 #11

🤖 triggering CI on branch 'redhat-v1.5.2' after synching from upstream/v1.5.2

🤖 triggering CI on branch 'redhat-v1.5.2' after synching from upstream/v1.5.2 #11

Workflow file for this run

---
name: Test CRDB
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: 1.19
- uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0
with:
version: 'v1.51.1'
args: ./storage/crdb
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: '1.19'
check-latest: true
cache: true
- name: Run tests
run: go test -v ./storage/crdb/... ./quota/crdbqm/...
integration:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: '1.19'
check-latest: true
cache: true
- name: Build before tests
run: go mod download && go build ./...
- name: Run CockroachDB
run: docker run --rm -d --name=roach -p 8080:8080 -p 26257:26257 -v "${PWD}/cockroach-data:/cockroach/cockroach-data" cockroachdb/cockroach:latest start-single-node --insecure
- name: Wait for CockroachDB
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3
with:
timeout_seconds: 15
max_attempts: 3
retry_on: error
command: docker exec roach ./cockroach sql --insecure -e "SELECT 1"
- name: Get crdb logs
run: docker logs roach
- name: Run tests
run: ./integration/integration_test.sh
env:
TEST_COCKROACHDB_URI: postgresql://root@localhost:26257/defaultdb?sslmode=disable
CRDB_IN_CONTAINER: true
CRDB_CONTAINER_NAME: roach