github.com/tailscale/wireguard-go@v0.0.20201119-0.20210522003738-46b531feb08a/.github/workflows/linux.yml (about)

     1  name: Linux
     2  
     3  on:
     4    push:
     5      branches:
     6        - main
     7    pull_request:
     8      branches:
     9        - "*"
    10  
    11  jobs:
    12    build:
    13      runs-on: ubuntu-latest
    14  
    15      if: "!contains(github.event.head_commit.message, '[ci skip]')"
    16  
    17      steps:
    18        - name: Set up Go
    19          uses: actions/setup-go@v1
    20          with:
    21            go-version: 1.16
    22          id: go
    23  
    24        - name: Check out code into the Go module directory
    25          uses: actions/checkout@v1
    26  
    27        - name: Basic build
    28          run: go build ./...
    29  
    30        - name: Run tests on linux
    31          run: go test -bench=. -benchtime=1x ./...
    32  
    33        - name: Run tests on linux with -race flag
    34          run: go test -race -bench=. -benchtime=1x ./...
    35  
    36        - uses: k0kubun/action-slack@v2.0.0
    37          with:
    38            payload: |
    39              {
    40                "attachments": [{
    41                  "text": "${{ job.status }}: ${{ github.workflow }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ env.COMMIT_DATE }} #${{ env.COMMIT_NUMBER_OF_DAY }}> " +
    42                          "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
    43                          "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
    44                  "color": "danger"
    45                }]
    46              }
    47          env:
    48            SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
    49          if: failure() && github.event_name == 'push'