2021-06-17 00:39:35 +09:00

26 lines
677 B
YAML

name: Test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@v1
with:
go-version: '1.16.x'
- name: Execute test and upload coverage
run: |
go version
go test -coverprofile=coverage.txt -covermode=atomic -p 1 . ./worker ./cli ./State
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
REDIS_URL: redis://localhost:${{ job.services.redis.ports['6379'] }}
services:
redis:
image: redis
ports:
- 6379/tcp