bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/.github/workflows/ci.yaml (about)

     1  name: CI
     2  
     3  on:
     4    pull_request:
     5    push:
     6      branches: [ master ]
     7  
     8  jobs:
     9    checks:
    10      name: Code style
    11      runs-on: ubuntu-18.04
    12      steps:
    13        - name: Set up Go
    14          uses: actions/setup-go@v2
    15          with:
    16            go-version: ^1.13
    17          id: go
    18        - name: Checkout
    19          uses: actions/checkout@v2
    20        - name: Check suspicious constructs
    21          run: make vet
    22        - name: Check order of imports
    23          run: make goimports-check
    24        - name: Check if modules were tidied up
    25          run: make tidy-check
    26  
    27    generated:
    28      name: Generated code
    29      runs-on: ubuntu-18.04
    30      steps:
    31        - name: Set up Go
    32          uses: actions/setup-go@v2
    33          with:
    34            go-version: ^1.13
    35          id: go
    36        - name: Checkout
    37          uses: actions/checkout@v2
    38        - name: Install dependencies
    39          run: make deps
    40        - name: Check whether go generate has run
    41          run: export PATH=$(npm bin):$PATH && make generate
    42  
    43    build_and_test:
    44      name: Build and test
    45      runs-on: ubuntu-18.04
    46      steps:
    47        - name: Set up Go
    48          uses: actions/setup-go@v2
    49          with:
    50            go-version: ^1.13
    51          id: go
    52        - name: Checkout
    53          uses: actions/checkout@v2
    54        - name: Compile
    55          run: make build
    56        - name: Tests
    57          run: make test
    58        - name: Build bosun binary
    59          run: make bosun
    60        - name: Test startup
    61          run: build/test-startup.sh
    62  
    63    cross-compile:
    64      runs-on: ubuntu-18.04
    65      strategy:
    66        matrix:
    67          os: [ "linux", "darwin", "windows" ]
    68      name: Build ${{ matrix.os }} binary
    69      steps:
    70        - name: Checkout
    71          uses: actions/checkout@v2
    72        - name: Setup Go
    73          uses: actions/setup-go@v2
    74          with:
    75            go-version: "^1.13"
    76        - name: Build ${{ matrix.os }} binary
    77          run: make build-${{ matrix.os }}