try to fix S2 tests on github #198
Workflow file for this run
This file contains 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 ] | |
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@128a63446a954579617e875aaab7d2978154e969 | |
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 libschematest partitions 2" -h 127.0.0.1 | |
mysql -u root -ptest -e "set global log_file_size_partitions = 1M" -h 127.0.0.1 | |
mysql -u root -ptest -e "set global log_file_size_ref_dbs = 1M" -h 127.0.0.1 | |
- name: Check out repository code | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- name: Set up Go | |
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 | |
with: | |
go-version: 1.16 | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
env: | |
LIBSCHEMA_SINGLESTORE_TEST_DSN: "root:test@tcp(127.0.0.1:3306)/libschematest?tls=false" | |
run: go test ./lsmysql/... ./lssinglestore/... -v | |
- name: Run Coverage | |
env: | |
LIBSCHEMA_SINGLESTORE_TEST_DSN: "root:test@tcp(127.0.0.1:3306)/libschematest?tls=false" | |
run: go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/muir/libschema/... ./lsmysql/... ./lssinglestore/... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 | |
with: | |
verbose: true | |
flags: singlestore_tests | |
fail_ci_if_error: true | |