Tidb cloud #51
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: Go | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
- name: Build | |
run: go build -v ./... | |
- name: Start MongoDB | |
uses: supercharge/mongodb-github-action@1.8.0 | |
with: | |
mongodb-version: 4.2 | |
mongodb-username: root | |
mongodb-password: pwd | |
mongodb-port: 27017 | |
mongodb-db: fastflow | |
- name: Shutdown Ubuntu MySQL (SUDO) | |
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it | |
- name: Set up MySQL | |
uses: mirromutth/mysql-action@v1.1 | |
with: | |
host port: 55000 # Optional, default value is 3306. The port of host | |
container port: 55000 # Optional, default value is 3306. The port of container | |
mysql version: '8.0' # Optional, default value is "latest". The version of the MySQL | |
mysql database: 'fastflow' # Optional, default value is "test". The specified database which will be create | |
mysql root password: mysqlpw # Required if "mysql user" is empty, default is empty. The root superuser password | |
- name: Test | |
run: make g-test | |
- name: Upload Coverage report to CodeCov | |
uses: codecov/codecov-action@v2 | |
with: | |
file: ./coverage.out | |
- name: Integration Test | |
run: go test -race -coverprofile=integration-coverage.out ./... -tags=integration | |
- name: Upload Coverage report to CodeCov | |
uses: codecov/codecov-action@v2 | |
with: | |
file: ./integration-coverage.out |