mirror of
https://github.com/sony/sonyflake.git
synced 2026-01-04 18:43:56 +00:00
55 lines
988 B
YAML
55 lines
988 B
YAML
name: CI for v2 Module
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- README.md
|
|
- .github/workflows/test-v2.yml
|
|
- v2/**
|
|
pull_request:
|
|
paths:
|
|
- README.md
|
|
- .github/workflows/test-v2.yml
|
|
- v2/**
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
test-v2:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.23.x, 1.24.x]
|
|
os: [ubuntu-latest]
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./v2
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: ./v2/go.mod
|
|
|
|
- name: Tidy modules
|
|
run: go mod tidy
|
|
|
|
- name: Lint Code
|
|
uses: golangci/golangci-lint-action@v6
|
|
with:
|
|
working-directory: ./v2
|
|
|
|
- name: Check format
|
|
run: test -z "`gofmt -l .`"
|
|
|
|
- name: Run tests
|
|
run: go test ./... -v
|
|
|
|
- name: Build example
|
|
run: cd example && ./linux64_build.sh
|