Skip to content

Merge pull request #4 from MikeMwita/devmike #10

Merge pull request #4 from MikeMwita/devmike

Merge pull request #4 from MikeMwita/devmike #10

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
build-across-platforms:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache-dependency-path: "go.sum"
- name: Set up QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-buildx-action@v3
- name: Build Binaries
run: |
make all -j $(nproc)
- name: Build docker images
if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request'
run: |
make dockers -j $(nproc)
linting:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache-dependency-path: "go.sum"
- name: Checkout code
uses: actions/checkout@v4
- name: Check linting
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
make lint
test:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache-dependency-path: "go.sum"
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests
run: |
make test
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: goveralls -coverprofile=cover.out -service=github