deps: bump protobuf (PROJQUAY-7970) (#3331) #2
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: Config Tool | |
on: | |
push: | |
branches: | |
- "!dependabot/*" | |
- "*" | |
paths: | |
- config-tool/** | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- config-tool/** | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.21 | |
cache-dependency-path: config-tool/go.sum | |
- name: Verify go.mod | |
run: cd ./config-tool && go mod tidy && git diff --exit-code | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.21 | |
cache-dependency-path: config-tool/go.sum | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build | |
run: cd ./config-tool && go build -v ./... | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
container: docker.io/library/golang:1.21 | |
services: | |
postgres: | |
image: postgres:11.5 | |
env: | |
POSTGRES_USER: "user" | |
POSTGRES_PASSWORD: "password" | |
POSTGRES_DB: "quay" | |
redis: | |
image: redis:latest | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: quay | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Workaround for dubious ownership issue | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Build | |
run: cd ./config-tool && go build -v ./... | |
- name: Tests | |
run: cd ./config-tool && go test ./pkg/lib/fieldgroups/... | |
env: | |
GODEBUG: x509ignoreCN=0 | |
cypress: | |
name: Cypress | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker Build | |
run: cd config-tool && docker build -t localhost/config-tool:latest . | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 | |
with: | |
browser: chrome | |
start: docker run --rm -p 8080:8080 -v ${{ github.workspace }}/config-tool/pkg/lib/editor/cypress/conf:/conf localhost/config-tool:latest editor --config-dir /conf --password qwerty | |
wait-on: 'http://localhost:8080' | |
wait-on-timeout: 120 | |
working-directory: config-tool/pkg/lib/editor | |
- name: Upload screenshots and videos | |
uses: actions/upload-artifact@v3 | |
if: success() || failure() | |
with: | |
name: cypress-artifacts | |
path: | | |
config-tool/pkg/lib/editor/cypress/screenshots | |
config-tool/pkg/lib/editor/cypress/videos | |
if-no-files-found: ignore |