Skip to content

Bearer access token (#118) #481

Bearer access token (#118)

Bearer access token (#118) #481

Workflow file for this run

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 firebase-tools@12.0.1
- 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