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

     1  name: Windows
     2  
     3  on:
     4    push:
     5      branches:
     6        - main
     7    pull_request:
     8      branches:
     9        - "*"
    10  
    11  jobs:
    12    test:
    13      runs-on: windows-latest
    14  
    15      if: "!contains(github.event.head_commit.message, '[ci skip]')"
    16  
    17      steps:
    18        - name: Install Go
    19          uses: actions/setup-go@v2
    20          with:
    21            go-version: 1.16.x
    22  
    23        - name: Checkout code
    24          uses: actions/checkout@v2
    25  
    26        - name: Restore Cache
    27          uses: actions/cache@v2
    28          with:
    29            path: ~/go/pkg/mod
    30            key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    31            restore-keys: |
    32              ${{ runner.os }}-go-
    33  
    34        - name: Test
    35          run: go test -bench=. -benchtime=1x ./...
    36  
    37        - name: Test with -race flag
    38          run: go test -race -bench=. -benchtime=1x ./...
    39  
    40        - uses: k0kubun/action-slack@v2.0.0
    41          with:
    42            payload: |
    43              {
    44                "attachments": [{
    45                  "text": "${{ job.status }}: ${{ github.workflow }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ env.COMMIT_DATE }} #${{ env.COMMIT_NUMBER_OF_DAY }}> " +
    46                          "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
    47                          "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
    48                  "color": "danger"
    49                }]
    50              }
    51          env:
    52            SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
    53          if: failure() && github.event_name == 'push'