github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/.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    # push:
     9    #  branches: [ master ]
    10    pull_request:
    11      branches: [ master ]
    12  
    13    # Allows you to run this workflow manually from the Actions tab
    14    workflow_dispatch:
    15  
    16  # A workflow run is made up of one or more jobs that can run sequentially or in parallel
    17  jobs:
    18    build:
    19      # The type of runner that the job will run on
    20      runs-on: ubuntu-latest
    21  
    22      # Steps represent a sequence of tasks that will be executed as part of the job
    23      steps:
    24        - uses: actions/checkout@v2
    25  
    26        - name: Set up Go
    27          uses: actions/setup-go@v2
    28          with:
    29            go-version: 1.15
    30  
    31        - name: Setup environment
    32          run: |
    33            go get golang.org/x/crypto/ssh
    34            go get golang.org/x/tools/cmd/goimports
    35            go get github.com/wadey/gocovmerge
    36            go get github.com/mattn/goveralls
    37  
    38        - name: Run go vet
    39          run: go vet ./...
    40  
    41        - name: Run format check
    42          run: |
    43            ./script/format
    44  
    45        - name: Run unit tests
    46          run: |
    47            ./script/unittest
    48            ./script/coverage
    49  
    50        - uses: shogo82148/actions-goveralls@v1.4.5
    51          with:
    52            path-to-profile: cover.out