mirror of
https://github.com/sony/sonyflake.git
synced 2026-02-07 08:40:41 +00:00
Add v2
This commit is contained in:
43
.github/workflows/test-v1.yml
vendored
Normal file
43
.github/workflows/test-v1.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: CI for v1 Module
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'v2/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'v2/**'
|
||||
|
||||
jobs:
|
||||
test-v1:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.23.x, 1.24.x]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{matrix.go-version}}
|
||||
|
||||
- name: gofmt
|
||||
run: test -z "`gofmt -l .`"
|
||||
|
||||
- name: golint
|
||||
run: test -z "`golint ./...`"
|
||||
|
||||
- name: go test
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Build example
|
||||
run: cd example && ./linux64_build.sh
|
||||
46
.github/workflows/test-v2.yml
vendored
Normal file
46
.github/workflows/test-v2.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: CI for v2 Module
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'v2/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'v2/**'
|
||||
|
||||
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: Run tests
|
||||
run: go test ./... -v
|
||||
|
||||
- name: gofmt
|
||||
run: test -z "`gofmt -l .`"
|
||||
|
||||
- name: golint
|
||||
run: test -z "`golint ./...`"
|
||||
|
||||
- name: Build example
|
||||
run: cd example && ./linux64_build.sh
|
||||
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
@@ -1,24 +0,0 @@
|
||||
on: [push, pull_request]
|
||||
name: Test
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.23.x, 1.24.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{matrix.go-version}}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: gofmt
|
||||
run: test -z "`gofmt -l .`"
|
||||
- name: golint
|
||||
run: test -z "`golint ./...`"
|
||||
- name: go test
|
||||
run: go test -v ./...
|
||||
- name: Build example
|
||||
run: cd example && ./linux64_build.sh
|
||||
Reference in New Issue
Block a user