...

Text file src/github.com/GoogleCloudPlatform/cloudsql-proxy/.github/workflows/tests.yaml

Documentation: github.com/GoogleCloudPlatform/cloudsql-proxy/.github/workflows

     1# Copyright 2020 Google LLC
     2#
     3# Licensed under the Apache License, Version 2.0 (the "License");
     4# you may not use this file except in compliance with the License.
     5# You may obtain a copy of the License at
     6#
     7#      http://www.apache.org/licenses/LICENSE-2.0
     8#
     9# Unless required by applicable law or agreed to in writing, software
    10# distributed under the License is distributed on an "AS IS" BASIS,
    11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12# See the License for the specific language governing permissions and
    13# limitations under the License.
    14
    15name: tests
    16on: [pull_request]
    17
    18jobs:
    19  lint:
    20    name: lint
    21    runs-on: ubuntu-latest
    22    steps:
    23    - name: Setup Go
    24      uses: actions/setup-go@v2
    25      with:
    26        go-version: '1.16'
    27    - name: Install goimports
    28      run: go get golang.org/x/tools/cmd/goimports
    29    - name: Checkout code
    30      uses: actions/checkout@v2
    31    - run: goimports -w .
    32    - run: go mod tidy
    33    - name: Verify no changes from goimports and go mod tidy. If you're reading this and the check has failed, run `goimports -w . && go mod tidy`.
    34      run: git diff --exit-code 
    35    - name: check for mismatch
    36      shell: bash
    37      run: |
    38        VERSION=$(cat version.txt)
    39        grep -w \"$VERSION\" cmd/cloud_sql_proxy/cloud_sql_proxy.go || exit 1

View as plain text