Add CI workflow for Golang testing
This commit is contained in:
48
.github/workflows/CI.yaml
vendored
Normal file
48
.github/workflows/CI.yaml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
name: Golan Testing
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- 'README.md'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- 'README.md'
|
||||
|
||||
jobs:
|
||||
testing:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version:
|
||||
- 1.25.x
|
||||
os:
|
||||
- ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Golang environment
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Go Get / Go Test
|
||||
run: |
|
||||
go get -u .
|
||||
go test ./...
|
||||
|
||||
- name: Output Summary
|
||||
id: output-summary
|
||||
shell: bash
|
||||
run: |
|
||||
echo "CI pipeline has been compiled for ${{ github.repository }} with a new version ${{ steps.vars.outputs.COMMIT_SHORT_SHA }}" >> $GITHUB_STEP_SUMMARY
|
Reference in New Issue
Block a user