Fix missing imports #470
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: Test | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
IGN_DB_USERNAME: gazebo | |
IGN_DB_PASSWORD: 1234 | |
IGN_DB_NAME: gazebo_db | |
services: | |
mysql: | |
image: mysql:5.7 | |
ports: | |
- 3306 | |
env: | |
MYSQL_USER: ${{ env.IGN_DB_USERNAME }} | |
MYSQL_PASSWORD: ${{ env.IGN_DB_PASSWORD }} | |
MYSQL_DATABASE: "${{env.IGN_DB_NAME}}_test" | |
MYSQL_RANDOM_ROOT_PASSWORD: true | |
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Verify MySQL connection | |
env: | |
PORT: ${{ job.services.mysql.ports[3306] }} | |
run: | | |
while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do | |
sleep 1 | |
done | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
cache: true | |
- name: Install Firebase Emulator Suite | |
run: | | |
npm install -g [email protected] | |
- name: Test | |
env: | |
IGN_DB_ADDRESS: "127.0.0.1:${{ job.services.mysql.ports[3306] }}" | |
GOOGLE_CLOUD_PROJECT: "test-project" | |
FIRESTORE_EMULATOR_HOST: "localhost:8080" | |
run: | | |
firebase emulators:start --project $GOOGLE_CLOUD_PROJECT & | |
go test -timeout 60m -covermode=atomic -coverprofile=coverage.tx -v ./... | |
go tool cover -func=coverage.tx -o=coverage.out |