github.com/trustbloc/kms-go@v1.1.2/.github/workflows/build.yml (about)

     1  #
     2  # Copyright Gen Digital Inc. All Rights Reserved.
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  #
     6  
     7  name: "kms-go ci"
     8  
     9  on:
    10    push:
    11      branches: [ main ]
    12    pull_request:
    13      branches: [ main ]
    14  
    15  jobs:
    16    SemanticPullRequest:
    17      name: Semantic Pull Request Check
    18      if: github.event_name == 'pull_request'
    19      runs-on: ubuntu-latest
    20      steps:
    21        - uses: amannn/action-semantic-pull-request@v4
    22          env:
    23            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    24  
    25    Checks:
    26      runs-on: ubuntu-22.04
    27      timeout-minutes: 10
    28      steps:
    29        - uses: actions/checkout@v3
    30        - name: Setup Go 1.22
    31          uses: actions/setup-go@v4
    32          with:
    33            go-version: '1.22'
    34        - name: Run checks
    35          run: |
    36            echo $PATH
    37            go env
    38            echo ${{ github.workspace }}
    39            make checks
    40          env:
    41            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    42  
    43    UnitTest:
    44      runs-on: ubuntu-22.04
    45      timeout-minutes: 10
    46      steps:
    47  
    48        - name: Setup Go 1.22
    49          uses: actions/setup-go@v4
    50          with:
    51            go-version: '1.22'
    52          id: go
    53  
    54        - uses: actions/checkout@v3
    55  
    56        - name: Run unit test
    57          timeout-minutes: 15
    58          run: make unit-test
    59  
    60        - name: Upload coverage to Codecov
    61          timeout-minutes: 10
    62          uses: codecov/codecov-action@v2.1.0
    63          with:
    64            file: ./coverage.out