github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/.github/workflows/ci.yml (about)

     1  # This is a ci workflow to help you get started with Actions
     2  
     3  name: CI
     4  
     5  # Controls when the action will run. 
     6  on:
     7    # Triggers the workflow on push or pull request events but only for the master branch
     8    pull_request:
     9      branches: [ master ]
    10  
    11    # Allows you to run this workflow manually from the Actions tab
    12    workflow_dispatch:
    13  
    14  # A workflow run is made up of one or more jobs that can run sequentially or in parallel
    15  jobs:
    16    build:
    17      # The type of runner that the job will run on
    18      runs-on: ubuntu-latest
    19  
    20      # Steps represent a sequence of tasks that will be executed as part of the job
    21      steps:
    22        - uses: actions/checkout@v2
    23  
    24        - name: Set up Go
    25          uses: actions/setup-go@v2
    26          with:
    27            go-version: 1.18
    28  
    29        - name: Setup environment
    30          run: |
    31            go install github.com/wadey/gocovmerge@latest
    32            go install github.com/mattn/goveralls@latest
    33  
    34        - name: Run go vet
    35          run: go vet ./...
    36  
    37        - name: Run format check
    38          run: |
    39            ./script/format
    40  
    41        - name: Run unit tests
    42          run: |
    43            ./script/unittest
    44            ./script/coverage
    45  
    46        - uses: shogo82148/actions-goveralls@v1.4.5
    47          with:
    48            path-to-profile: cover.out