2023-09-17 00:55:17 +00:00
|
|
|
name: "Go CI"
|
2023-04-26 21:20:06 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2023-09-17 00:55:17 +00:00
|
|
|
- 'dev-*'
|
2023-04-26 21:20:06 +00:00
|
|
|
pull_request:
|
2024-01-05 03:36:05 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '**.yml'
|
2023-04-26 21:20:06 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-09-17 00:55:17 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2024-05-04 22:38:06 +00:00
|
|
|
- name: Set up Go 1.22
|
2023-09-17 00:55:17 +00:00
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
2024-05-04 22:38:06 +00:00
|
|
|
go-version: "1.22"
|
2023-09-17 00:55:17 +00:00
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
uses: golangci/golangci-lint-action@v3
|
|
|
|
with:
|
|
|
|
version: v1.54
|
|
|
|
skip-pkg-cache: true
|
|
|
|
args: --out-format=colored-line-number --timeout=20m
|
|
|
|
|
|
|
|
- name: Format
|
|
|
|
run: make fmt check_changes
|
|
|
|
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2024-05-04 22:38:06 +00:00
|
|
|
- name: Set up Go 1.22
|
2023-09-17 00:55:17 +00:00
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
2024-05-04 22:38:06 +00:00
|
|
|
go-version: "1.22"
|
2023-09-17 00:55:17 +00:00
|
|
|
|
2024-05-11 19:02:57 +00:00
|
|
|
- name: Check Go modules
|
2023-09-17 00:55:17 +00:00
|
|
|
run: make go_mod check_changes
|
|
|
|
|
2024-05-11 19:02:57 +00:00
|
|
|
- name: Check translations
|
|
|
|
run: make check-tr
|
|
|
|
|
2023-09-17 00:55:17 +00:00
|
|
|
test:
|
2023-04-26 21:20:06 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-09-17 00:55:17 +00:00
|
|
|
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
|
2024-05-04 22:38:06 +00:00
|
|
|
go: ["1.22"]
|
2023-04-26 21:20:06 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-04-26 21:55:37 +00:00
|
|
|
uses: actions/checkout@v3
|
2023-04-26 21:20:06 +00:00
|
|
|
|
|
|
|
- name: Set up Go ${{ matrix.go }}
|
2023-09-17 00:55:17 +00:00
|
|
|
uses: actions/setup-go@v4
|
2023-04-26 21:20:06 +00:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
|
|
|
|
2023-09-17 00:55:17 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: make test
|
2023-04-26 21:20:06 +00:00
|
|
|
|