github.com/snowflakedb/gosnowflake@v1.9.0/.github/workflows/build-test.yml (about)

     1  name: Build and Test
     2  
     3  on:
     4      push:
     5          braches:
     6              - master
     7          tags:
     8              - v*
     9      pull_request:
    10          branches:
    11              - master
    12      schedule:
    13        - cron:  '7 3 * * *'
    14      workflow_dispatch:
    15          inputs:
    16            logLevel:
    17              default: warning
    18              description: "Log level"
    19              required: true
    20            tags:
    21              description: "Test scenario tags"
    22  
    23  concurrency:
    24    # older builds for the same pull request numer or branch should be cancelled
    25    group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
    26    cancel-in-progress: true
    27  
    28  jobs:
    29      lint:
    30          runs-on: ubuntu-latest
    31          strategy:
    32            fail-fast: false
    33          name: Check linter
    34          steps:
    35            - uses: actions/checkout@v1
    36            - name: Setup go
    37              uses: actions/setup-go@v2
    38              with:
    39                go-version: 1.19
    40            - name: Format, Lint
    41              shell: bash
    42              run: ./ci/build.sh
    43      build-test-linux:
    44          runs-on: ubuntu-latest
    45          strategy:
    46              fail-fast: false
    47              matrix:
    48                  cloud: [ 'AWS', 'AZURE', 'GCP' ]
    49                  go: [ '1.19', '1.20', '1.21' ]
    50          name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Ubuntu
    51          steps:
    52              - uses: actions/checkout@v1
    53              - name: Setup go
    54                uses: actions/setup-go@v2
    55                with:
    56                    go-version: ${{ matrix.go }}
    57              - name: Test
    58                shell: bash
    59                env:
    60                  PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
    61                  CLOUD_PROVIDER: ${{ matrix.cloud }}
    62                  GORACE: history_size=7
    63                run: ./ci/test.sh
    64              - name: Upload coverage to Codecov
    65                uses: codecov/codecov-action@v3
    66                with:
    67                  token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
    68      build-test-mac:
    69          runs-on: macos-latest
    70          strategy:
    71              fail-fast: false
    72              matrix:
    73                  cloud: [ 'AWS', 'AZURE', 'GCP' ]
    74                  go: [ '1.19', '1.20', '1.21' ]
    75          name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Mac
    76          steps:
    77              - uses: actions/checkout@v1
    78              - name: Setup go
    79                uses: actions/setup-go@v2
    80                with:
    81                    go-version: ${{ matrix.go }}
    82              - name: Test
    83                shell: bash
    84                env:
    85                  PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
    86                  CLOUD_PROVIDER: ${{ matrix.cloud }}
    87                run: ./ci/test.sh
    88              - name: Upload coverage to Codecov
    89                uses: codecov/codecov-action@v3
    90                with:
    91                  token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
    92      build-test-windows:
    93          runs-on: windows-latest
    94          strategy:
    95              fail-fast: false
    96              matrix:
    97                  cloud: [ 'AWS', 'AZURE', 'GCP' ]
    98                  go: [ '1.19', '1.20', '1.21' ]
    99          name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Windows
   100          steps:
   101              - uses: actions/checkout@v1
   102              - name: Setup go
   103                uses: actions/setup-go@v2
   104                with:
   105                    go-version: ${{ matrix.go }}
   106              - uses: actions/setup-python@v1
   107                with:
   108                  python-version: '3.x'
   109                  architecture: 'x64'
   110              - name: Test
   111                shell: cmd
   112                env:
   113                  PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
   114                  CLOUD_PROVIDER: ${{ matrix.cloud }}
   115                run: ci\\test.bat
   116              - name: Upload coverage to Codecov
   117                uses: codecov/codecov-action@v3
   118                with:
   119                  token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}