Split CI jobs

This commit is contained in:
ChillerDragon 2024-06-20 12:12:15 +08:00
parent a112473d0f
commit 5627630145

View file

@ -7,7 +7,6 @@ on:
branches: [ "master" ] branches: [ "master" ]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -21,8 +20,28 @@ jobs:
- name: Build - name: Build
run: go build -v ./... run: go build -v ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Test - name: Test
run: go test -v ./... run: go test -v ./...
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Format - name: Format
run: diff -u <(echo -n) <(gofmt -d ./) run: diff -u <(echo -n) <(gofmt -d ./)