Build and Test #249
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: | |
| - master | |
| - SNOW-* | |
| schedule: | |
| - cron: '7 3 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| goTestParams: | |
| default: | |
| description: 'Parameters passed to go test' | |
| concurrency: | |
| # older builds for the same pull request numer or branch should be cancelled | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Check linter | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - name: Setup go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@9fae48acfc02a90574d7c304a1758ef9895495fa # golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.4.0 | |
| - name: Format, Lint | |
| shell: bash | |
| run: ./ci/build.sh | |
| build-test-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cloud: [ 'AWS', 'AZURE', 'GCP' ] | |
| go: [ '1.23', '1.24', '1.25' ] | |
| name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Ubuntu | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - uses: actions/setup-java@v4 # for wiremock | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Setup go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Test | |
| shell: bash | |
| env: | |
| PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }} | |
| GOLANG_PRIVATE_KEY_SECRET: ${{ secrets.GOLANG_PRIVATE_KEY_SECRET }} | |
| CLOUD_PROVIDER: ${{ matrix.cloud }} | |
| GORACE: history_size=7 | |
| GO_TEST_PARAMS: ${{ inputs.goTestParams }} | |
| WIREMOCK_PORT: 14335 | |
| WIREMOCK_HTTPS_PORT: 13567 | |
| run: ./ci/test.sh | |
| - name: Upload test results to Codecov | |
| if: ${{!cancelled()}} | |
| uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }} | |
| build-test-linux-no-home: | |
| runs-on: ubuntu-latest | |
| name: Ubuntu - no HOME | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - uses: actions/setup-java@v4 # for wiremock | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Setup go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Test | |
| shell: bash | |
| env: | |
| PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }} | |
| GOLANG_PRIVATE_KEY_SECRET: ${{ secrets.GOLANG_PRIVATE_KEY_SECRET }} | |
| CLOUD_PROVIDER: AWS | |
| GORACE: history_size=7 | |
| GO_TEST_PARAMS: ${{ inputs.goTestParams }} | |
| WIREMOCK_PORT: 14335 | |
| WIREMOCK_HTTPS_PORT: 13567 | |
| HOME_EMPTY: "yes" | |
| run: ./ci/test.sh | |
| build-test-mac: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cloud: [ 'AWS', 'AZURE', 'GCP' ] | |
| go: [ '1.23', '1.24', '1.25' ] | |
| name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Mac | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - uses: actions/setup-java@v4 # for wiremock | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Setup go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Test | |
| shell: bash | |
| env: | |
| PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }} | |
| GOLANG_PRIVATE_KEY_SECRET: ${{ secrets.GOLANG_PRIVATE_KEY_SECRET }} | |
| CLOUD_PROVIDER: ${{ matrix.cloud }} | |
| GO_TEST_PARAMS: ${{ inputs.goTestParams }} | |
| WIREMOCK_PORT: 14335 | |
| WIREMOCK_HTTPS_PORT: 13567 | |
| run: ./ci/test.sh | |
| - name: Upload test results to Codecov | |
| if: ${{!cancelled()}} | |
| uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }} | |
| build-test-mac-no-home: | |
| runs-on: macos-latest | |
| name: Mac - no HOME | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - uses: actions/setup-java@v4 # for wiremock | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Setup go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Test | |
| shell: bash | |
| env: | |
| PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }} | |
| GOLANG_PRIVATE_KEY_SECRET: ${{ secrets.GOLANG_PRIVATE_KEY_SECRET }} | |
| CLOUD_PROVIDER: AWS | |
| GO_TEST_PARAMS: ${{ inputs.goTestParams }} | |
| WIREMOCK_PORT: 14335 | |
| WIREMOCK_HTTPS_PORT: 13567 | |
| HOME_EMPTY: "yes" | |
| run: ./ci/test.sh | |
| build-test-windows: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cloud: [ 'AWS', 'AZURE', 'GCP' ] | |
| go: [ '1.23', '1.24', '1.25' ] | |
| name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Windows | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - uses: actions/setup-java@v4 # for wiremock | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Setup go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| architecture: 'x64' | |
| - name: Test | |
| shell: cmd | |
| env: | |
| PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }} | |
| GOLANG_PRIVATE_KEY_SECRET: ${{ secrets.GOLANG_PRIVATE_KEY_SECRET }} | |
| CLOUD_PROVIDER: ${{ matrix.cloud }} | |
| GO_TEST_PARAMS: ${{ inputs.goTestParams }} | |
| WIREMOCK_PORT: 14335 | |
| WIREMOCK_HTTPS_PORT: 13567 | |
| run: ci\\test.bat | |
| - name: Upload test results to Codecov | |
| if: ${{!cancelled()}} | |
| uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }} | |
| ecc: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| name: Elliptic curves check | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - uses: actions/setup-java@v4 # for wiremock | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Setup go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Test | |
| shell: bash | |
| env: | |
| PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }} | |
| GOLANG_PRIVATE_KEY_SECRET: ${{ secrets.GOLANG_PRIVATE_KEY_SECRET }} | |
| CLOUD_PROVIDER: AWS | |
| GORACE: history_size=7 | |
| GO_TEST_PARAMS: ${{ inputs.goTestParams }} -run TestQueryViaHttps | |
| WIREMOCK_PORT: 14335 | |
| WIREMOCK_HTTPS_PORT: 13567 | |
| WIREMOCK_ENABLE_ECDSA: true | |
| run: ./ci/test.sh |