mirror of https://github.com/0xERR0R/blocky.git
81 lines
1.7 KiB
YAML
81 lines
1.7 KiB
YAML
name: Makefile
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
security-events: write
|
|
actions: read
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
GINKGO_PROCS: --procs=1
|
|
|
|
jobs:
|
|
make:
|
|
name: make
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- make: build
|
|
go: true
|
|
docker: false
|
|
- make: test
|
|
go: true
|
|
docker: false
|
|
- make: race
|
|
go: true
|
|
docker: false
|
|
- make: docker-build
|
|
go: false
|
|
docker: true
|
|
- make: e2e-test
|
|
go: true
|
|
docker: true
|
|
- make: goreleaser
|
|
go: false
|
|
docker: false
|
|
- make: lint
|
|
go: true
|
|
docker: false
|
|
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Golang
|
|
uses: actions/setup-go@v5
|
|
if: matrix.go == true
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Download dependencies
|
|
run: go mod download
|
|
if: matrix.go == true
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
if: matrix.docker == true
|
|
|
|
- name: make ${{ matrix.make }}
|
|
run: make ${{ matrix.make }}
|
|
if: matrix.make != 'goreleaser'
|
|
env:
|
|
GO_SKIP_GENERATE: 1
|
|
|
|
- name: Upload results to codecov
|
|
uses: codecov/codecov-action@v4
|
|
if: matrix.make == 'test' && github.repository_owner == '0xERR0R'
|
|
|
|
- name: Check GoReleaser configuration
|
|
uses: goreleaser/goreleaser-action@v5
|
|
if: matrix.make == 'goreleaser'
|
|
with:
|
|
args: check
|