mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-13 22:39:06 +02:00
init go ci
This commit is contained in:
27
.github/workflows/CI/go_build.yml
vendored
27
.github/workflows/CI/go_build.yml
vendored
@@ -0,0 +1,27 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Go 1.22.x'
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.22.x'
|
||||
|
||||
- name: Display Go version
|
||||
run: go version
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
go get ${{ inputs.working-directory }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
go build ${{ inputs.working-directory }}
|
22
.github/workflows/CI/go_lint.yml
vendored
22
.github/workflows/CI/go_lint.yml
vendored
@@ -0,0 +1,22 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.22'
|
||||
cache: false
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v4
|
||||
with:
|
||||
version: latest
|
||||
working-directory: ${{ inputs.working-directory }}
|
23
.github/workflows/CI/go_test.yml
vendored
23
.github/workflows/CI/go_test.yml
vendored
@@ -0,0 +1,23 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
working-directory:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Go 1.22.x'
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.22.x'
|
||||
|
||||
- name: Display Go version
|
||||
run: go version
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
go test ${{ inputs.working-directory }}
|
Reference in New Issue
Block a user