Skip to content

Add initial CI/CD pipeline #1

Add initial CI/CD pipeline

Add initial CI/CD pipeline #1

Workflow file for this run

name: Build CI/CD
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test ./...
compile:
runs-on: ubuntu-latest
needs: test
if: success()
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install dependencies
run: go mod download
- name: Compile binary
run: go build -o myapp