Bump step-security/harden-runner from 2.17.0 to 2.18.0 #558
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: SingleStore tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ "**" ] | |
| permissions: # added using https://github.com/step-security/secure-workflows | |
| contents: read | |
| jobs: | |
| Test-Singlestore-integration: | |
| runs-on: ubuntu-latest | |
| environment: singlestore | |
| services: | |
| singlestoredb: | |
| image: ghcr.io/singlestore-labs/singlestoredb-dev | |
| ports: | |
| - 3306:3306 | |
| - 8080:8080 | |
| - 9000:9000 | |
| env: | |
| ROOT_PASSWORD: test | |
| SINGLESTORE_LICENSE: ${{ secrets.SINGLESTORE_LICENSE }} | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df | |
| with: | |
| egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
| - name: sanity check using mysql client | |
| run: | | |
| mysql -u root -ptest -e "CREATE DATABASE eventstest partitions 2" -h 127.0.0.1 | |
| mysql -u root -ptest -e "set global snapshots_to_keep = 1" -h 127.0.0.1 | |
| mysql -u root -ptest -e "set global minimal_disk_space = 10" -h 127.0.0.1 | |
| mysql -u root -ptest -e "set global log_file_size_partitions = 1048576" -h 127.0.0.1 | |
| mysql -u root -ptest -e "set global log_file_size_ref_dbs = 1048576" -h 127.0.0.1 | |
| mysql -u root -ptest -e "select @@data_conversion_compatibility_level" -h 127.0.0.1 | |
| mysql -u root -ptest -e "SET GLOBAL data_conversion_compatibility_level = '7.0'" -h 127.0.0.1 | |
| - name: Check out repository code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Set up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c | |
| with: | |
| go-version: '1.23' | |
| - name: Get Go cache paths | |
| id: go-cache-paths | |
| run: | | |
| echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT | |
| echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Go Build Cache | |
| id: events-build | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.go-cache-paths.outputs.go-build }} | |
| key: ${{ runner.os }}.go-build-${{ hashFiles('**/go.sum') }}-1.22.x | |
| - name: Go Mod Cache | |
| id: events-mod | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.go-cache-paths.outputs.go-mod }} | |
| key: ${{ runner.os }}.go-build-${{ hashFiles('**/go.sum') }}-1.22.x | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Start Kafka (3 brokers) | |
| id: kafka | |
| uses: ./.github/actions/kafka-3-brokers | |
| - name: Test and Coverage | |
| env: | |
| EVENTS_S2TEST_DSN: "root:test@tcp(127.0.0.1:3306)/eventstest?tls=false&parseTime=true" | |
| EVENTS_KAFKA_BROKERS: ${{ steps.kafka.outputs.brokers }} | |
| # NTEST_BUFFERING: "false" | |
| run: | | |
| export EVENTS_DEBUG_NOTIFY="true" | |
| export EVENTS_DEBUG_PRODUCE="true" | |
| export EVENTS_DEBUG_DELIVERY="true" | |
| export EVENTS_DEBUG_ACK="true" | |
| export EVENTS_DEBUG_CONSUME="true" | |
| export EVENTS_DEBUG_START_CONSUME="true" | |
| export EVENTS_DEBUG_BATCHING="true" | |
| export EVENTS_TEST_VERBOSE_SPANS="true" | |
| go test -coverprofile=coverage1.txt -covermode=atomic -coverpkg=github.com/singlestore-labs/events/... -v ./events2/... | |
| export EVENTS_DEBUG_NOTIFY="false" | |
| export EVENTS_DEBUG_PRODUCE="false" | |
| export EVENTS_DEBUG_DELIVERY="false" | |
| export EVENTS_DEBUG_ACK="false" | |
| export EVENTS_DEBUG_CONSUME="false" | |
| export EVENTS_DEBUG_START_CONSUME="false" | |
| export EVENTS_DEBUG_BATCHING="false" | |
| export EVENTS_TEST_VERBOSE_SPANS="false" | |
| go test -coverprofile=coverage2.txt -covermode=atomic -coverpkg=github.com/singlestore-labs/events/... ./events2/... | |
| cat coverage1.txt coverage2.txt > coverage.txt | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| verbose: true | |
| fail_ci_if_error: true | |
| flags: s2_tests | |
| name: s2_tests | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |