Middle+
Do you have experience with CI/CD? What did you do?
sobes.tech AI
Answer from AI
Yes, I have experience working with CI/CD. In Go projects, I set up automated build and testing through GitLab CI and GitHub Actions. For example, on push to a branch, unit tests, linters, and binary build were triggered. After successful tests, deployment to a staging server was performed using Ansible or Helm (for Kubernetes). I also configured automatic releases with tagging and artifact publication to Docker Registry.
Here's a simple pipeline example in GitHub Actions for Go:
name: Go CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...