CASSGO-76: Add Makefile #871
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [ opened, synchronize, reopened ] | |
| jobs: | |
| build: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go: [ '1.22', '1.23' ] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Run linting | |
| run: make check | |
| - name: Run unit tests | |
| run: make test-unit | |
| integration-cassandra: | |
| timeout-minutes: 15 | |
| needs: | |
| - build | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go: [ '1.22', '1.23' ] | |
| cassandra_version: [ '4.0.13', '4.1.6' ] | |
| auth: [ "false" ] | |
| compressor: [ "no-compression", "snappy", "lz4" ] | |
| tags: [ "cassandra", "integration", "ccm" ] | |
| proto_version: [ "4", "5" ] | |
| exclude: | |
| - proto_version: "5" | |
| compressor: "snappy" | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-go@v2 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - uses: actions/cache@v4 | |
| id: gomod-cache | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('go.mod') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-environment | |
| - name: Start cassandra nodes | |
| env: | |
| CASSANDRA_VERSION: ${{ matrix.cassandra_version }} | |
| run: | | |
| source ~/venv/bin/activate | |
| make cassandra-start | |
| sleep 30s | |
| - name: Integration tests | |
| env: | |
| CASSANDRA_VERSION: ${{ matrix.cassandra_version }} | |
| TEST_CQL_PROTOCOL: ${{ matrix.proto_version }} | |
| TEST_COMPRESSOR: ${{ matrix.compressor }} | |
| TEST_INTEGRATION_TAGS: ${{ matrix.tags }} | |
| run: | | |
| source ~/venv/bin/activate | |
| make test-integration | |
| - name: 'Save ccm logs' | |
| if: 'failure()' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ccm-cluster-cassandra-${{ matrix.cassandra_version }}-go-${{ matrix.go }}-tag-${{ matrix.tags }}-proto-version-${{ matrix.proto_version }}-compressor-${{ matrix.compressor }} | |
| path: /home/runner/.ccm/gocql_integration_test | |
| retention-days: 5 | |
| integration-auth-cassandra: | |
| timeout-minutes: 15 | |
| needs: | |
| - build | |
| name: Integration Tests with auth | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go: [ '1.22', '1.23' ] | |
| cassandra_version: [ '4.0.13' ] | |
| compressor: [ "no-compression", "snappy", "lz4" ] | |
| tags: [ "integration" ] | |
| proto_version: [ "4", "5" ] | |
| exclude: | |
| - proto_version: "5" | |
| compressor: "snappy" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-environment | |
| - name: Start cassandra nodes | |
| env: | |
| CASSANDRA_VERSION: ${{ matrix.cassandra_version }} | |
| TEST_CQL_PROTOCOL: ${{ matrix.proto_version }} | |
| TEST_COMPRESSOR: ${{ matrix.compressor }} | |
| run: | | |
| source ~/venv/bin/activate | |
| make cassandra-start | |
| sleep 30s | |
| - name: Integration tests | |
| env: | |
| CASSANDRA_VERSION: ${{ matrix.cassandra_version }} | |
| TEST_CQL_PROTOCOL: ${{ matrix.proto_version }} | |
| TEST_COMPRESSOR: ${{ matrix.compressor }} | |
| TEST_INTEGRATION_TAGS: ${{ matrix.tags }} | |
| run: | | |
| source ~/venv/bin/activate | |
| TEST_OPTS="-run=TestAuthentication" make test-integration |