mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-20 19:32:22 +02:00
git-subtree-dir: foundations/stream git-subtree-mainline:328a7dc269git-subtree-split:b7b6930b09
72 lines
1.6 KiB
YAML
72 lines
1.6 KiB
YAML
---
|
|
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: 'main'
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
yamllint:
|
|
name: yamllint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
- name: yaml-lint
|
|
uses: ibiqlik/action-yamllint@v1
|
|
with:
|
|
config_file: .github/yamllint.yaml
|
|
strict: true
|
|
build-and-test:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu
|
|
runs-on: ${{ matrix.os }}-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.24.1
|
|
- name: Build
|
|
run: go build -race ./...
|
|
- name: Test
|
|
run: go test -race ./...
|
|
checkgomod:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.24.1
|
|
- run: go mod tidy
|
|
- name: Check for changes in go.mod or go.sum
|
|
run: |
|
|
git diff --name-only --exit-code go.mod || ( echo "Run go mod tidy" && false )
|
|
golangci-lint:
|
|
name: golangci-lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.24.4
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v8
|
|
with:
|
|
version: v2.5.0
|
|
args: --timeout 3m --verbose
|