Skip to content

Update versions

Update versions #316

Workflow file for this run

name: Test
on: [push]
env:
GO111MODULE: "on"
jobs:
build:
name: Build, Test
runs-on: ubuntu-latest
services:
pubsub:
image: knarz/pubsub-emulator
ports:
- 8085:8085
datastore:
image: singularities/datastore-emulator
ports:
- 8081:8081
env:
DATASTORE_PROJECT_ID: test
DATASTORE_LISTEN_ADDRESS: 0.0.0.0:8081
redis:
image: redis:5.0
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
id: go
- name: Restore Cache
uses: actions/cache@v3.0.11
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Modules
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: Test
run: go test -v -race -coverprofile=coverage.out ./...
env:
PUBSUB_EMULATOR_HOST: localhost:8085
DATASTORE_EMULATOR_HOST: localhost:8081
REDIS_URL: localhost:6379
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.out
fail_ci_if_error: true