Merge pull request #5 from MikeMwita/devmike #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |