run mysql as container service in gh action #12
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: Build and test | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
BuildAndTestLibrary: | ||
runs-on: ubuntu-20.04 | ||
services: | ||
mysql: | ||
image: mysql | ||
ports: 3306:3306 | ||
Check failure on line 15 in .github/workflows/build_and_test.yml GitHub Actions / Build and testInvalid workflow file
|
||
env: | ||
MYSQL_ROOT_PASSWORD: "root" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21.0 | ||
- name: Formatting check | ||
run: ./gofmt_check.sh | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: latest | ||
args: --timeout 5m0s | ||
- name: Build | ||
run: go build | ||
- name: Test | ||
run: go test -v ./indexer |