Skip to content

fix(examples): install ca-certificates in kitchen containers #19

fix(examples): install ca-certificates in kitchen containers

fix(examples): install ca-certificates in kitchen containers #19

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- name: go vet
run: go vet ./...
- name: go test
shell: bash
run: go test -race -count=1 -coverprofile=coverage.out ./...
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}
path: coverage.out
retention-days: 7
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- name: Download ubuntu coverage
uses: actions/download-artifact@v4
with:
name: coverage-ubuntu-latest
path: .
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage.out
continue-on-error: true
- name: Print coverage summary
run: go tool cover -func=coverage.out | tail -1
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- name: go vet
run: go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=5m
build:
name: Build & Cross-compile
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- name: Build (linux/amd64)
run: CGO_ENABLED=0 go build -v ./cmd/gomnibus
- name: Cross-compile (darwin/amd64)
run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o /tmp/gomnibus-darwin-amd64 ./cmd/gomnibus
- name: Cross-compile (darwin/arm64)
run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /tmp/gomnibus-darwin-arm64 ./cmd/gomnibus
- name: Cross-compile (windows/amd64)
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o /tmp/gomnibus-windows-amd64.exe ./cmd/gomnibus
- name: Cross-compile (linux/arm64)
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o /tmp/gomnibus-linux-arm64 ./cmd/gomnibus
- name: Validate example project
run: ./gomnibus validate myapp --config examples/myapp/gomnibus.yaml 2>/dev/null || true
release:
name: Release
runs-on: ubuntu-latest
needs: [test, build]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}