You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scrutiny/.github/workflows/build.yaml

48 lines
1.6 KiB

name: CI
# This workflow is triggered on pushes & pull requests
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
container: karalabe/xgo-1.13.x
env:
GITHUB_WORKSPACE: /go/src/github.com/analogj/scrutiny
CGO_ENABLED: 1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: |
go mod vendor
go test -race -coverprofile=coverage.txt -covermode=atomic -v -tags "static" $(go list ./... | grep -v /vendor/)
- name: Build Binaries
run: |
make all
- name: Archive
uses: actions/upload-artifact@v2
with:
name: binaries.zip
path: |
/build/scrutiny-web-linux-amd64
/build/scrutiny-collector-metrics-linux-amd64
/build/scrutiny-web-linux-arm64
/build/scrutiny-collector-metrics-linux-arm64
/build/scrutiny-web-linux-arm-5
/build/scrutiny-collector-metrics-linux-arm-5
/build/scrutiny-web-linux-arm-6
/build/scrutiny-collector-metrics-linux-arm-6
/build/scrutiny-web-linux-arm-7
/build/scrutiny-collector-metrics-linux-arm-7
/build/scrutiny-web-windows-4.0-amd64.exe
/build/scrutiny-collector-metrics-windows-4.0-amd64.exe
# /build/scrutiny-web-freebsd-amd64
# /build/scrutiny-collector-metrics-freebsd-amd64
- uses: codecov/codecov-action@v1
with:
file: ${{ env.GITHUB_WORKSPACE }}/coverage.txt
flags: unittests
fail_ci_if_error: false