...

Text file src/github.com/vektah/gqlparser/v2/.github/workflows/pull-request.yml

Documentation: github.com/vektah/gqlparser/v2/.github/workflows

     1name: PR Check
     2
     3on: [pull_request]
     4
     5# When a new revision is pushed to a PR, cancel all in-progress CI runs for that
     6# PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency
     7concurrency:
     8  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
     9  cancel-in-progress: true
    10
    11jobs:
    12  go-lint:
    13    name: Go Lint
    14    runs-on: ubuntu-latest
    15    steps:
    16      - name: Check out code
    17        uses: actions/checkout@v3
    18
    19      - name: Golang Style and Lint Check
    20        uses: golangci/golangci-lint-action@v3
    21        timeout-minutes: 30
    22        with:
    23          # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
    24          version: latest
    25
    26  go-test:
    27    name: Go Test (${{ matrix.os }})
    28    runs-on: ${{ matrix.run }}
    29    strategy:
    30      fail-fast: false
    31      matrix:
    32        include:
    33          - os: linux
    34            run: ubuntu-latest
    35          # MacOS is disabled due to the high cost multiplier on GH Actions.
    36          #- os: darwin
    37          #  run: macos-latest
    38          # Windows not allowed currently because of line-ending conversion issues.
    39          #- os: windows
    40          #  run: windows-latest
    41    steps:
    42      - name: Check out code
    43        uses: actions/checkout@v3
    44
    45      - id: go_version
    46        name: Read go version
    47        run: echo "::set-output name=go_version::$(cat .go-version)"
    48
    49      - name: Install Go (${{ steps.go_version.outputs.go_version }})
    50        uses: actions/setup-go@v3
    51        with:
    52          go-version: ${{ steps.go_version.outputs.go_version }}
    53
    54      - name: Unit Test Golang
    55        run: go test ./...
    56        timeout-minutes: 30

View as plain text