...

Text file src/github.com/opencontainers/runtime-spec/.github/workflows/build-pr.yml

Documentation: github.com/opencontainers/runtime-spec/.github/workflows

     1name: build-pr
     2
     3on:
     4  pull_request:
     5    branches:
     6      - main
     7
     8jobs:
     9  run:
    10    runs-on: ubuntu-latest
    11
    12    strategy:
    13      matrix:
    14        go: [1.19.x, 1.20.x]
    15
    16    steps:
    17      - name: checkout source code
    18        uses: actions/checkout@v3
    19
    20      - name: setup go environment
    21        uses: actions/setup-go@v4
    22        with:
    23          go-version: ${{ matrix.go }}
    24      
    25      - name: create go.mod
    26        run: |
    27          # Fix for "cannot find main module" issue
    28          go mod init github.com/opencontainers/runtime-spec
    29
    30          go get -d ./schema/...
    31
    32      - name: run golangci-lint
    33        uses: golangci/golangci-lint-action@v3
    34        with:
    35          version: v1.51.2
    36          args: --verbose
    37
    38      - name: run tests
    39        run: |
    40          set -x
    41          make install.tools
    42
    43          make .govet
    44
    45          make .gitvalidation
    46          make docs
    47          make -C schema test

View as plain text