76 lines
1.7 KiB
YAML
76 lines
1.7 KiB
YAML
name: Continuous Integration
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
# - $default-branch
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
# - $default-branch
|
|
|
|
jobs:
|
|
build:
|
|
env:
|
|
COVER: true
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
# renovate: datasource=golang-version depName=golang
|
|
go-version: 1.22.4
|
|
id: go
|
|
|
|
- name: Get dependencies
|
|
env:
|
|
# renovate: datasource=github-tags depName=golangci/golangci-lint
|
|
GOLANGCI_LINT_VERSION: v1.55.2
|
|
# renovate: datasource=github-tags depName=codeclimate/test-reporter
|
|
CODECLIMATE_VERSION: v1.0.1
|
|
run: |
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-${CODECLIMATE_VERSION#v}-linux-amd64 > ./cc-test-reporter
|
|
chmod +x ./cc-test-reporter
|
|
|
|
- name: Verify Code Generation
|
|
run: |
|
|
make verify-generate
|
|
|
|
- name: Lint
|
|
run: |
|
|
make lint
|
|
|
|
- name: Build
|
|
run: |
|
|
make build
|
|
|
|
- name: Test
|
|
env:
|
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
|
run: |
|
|
./.github/workflows/test.sh
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Docker Build
|
|
run: |
|
|
make docker
|