Create pr-builder.yml

This commit is contained in:
Omindu Rathnaweera 2025-04-08 21:40:08 +05:30 committed by GitHub
parent 9a3d5346f2
commit aa5b32aa8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

41
.github/workflows/pr-builder.yml vendored Normal file
View file

@ -0,0 +1,41 @@
name: CI
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.16'
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod tidy
- name: Build
run: go build -v ./...
- name: Run tests
run: go test -v ./...
- name: Build status
run: echo "Build succeeded!"