dictyBase/modware-auth

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: Continuous integration
on:
  push:
    branches:
      - develop
jobs:
  test:
    runs-on: ubuntu-latest
    services:
      redis:
        image: redis:7.0.5-alpine
        ports:
          - 6379/tcp
    steps:
      - name: check out code
        uses: actions/checkout@v3
      - name: set up golang
        uses: actions/setup-go@v5
        with:
          go-version: '~1.20.6'
      - name: unit test
        run: go test -covermode=atomic -coverprofile=profile.cov -v ./...
        env:
          REDIS_MASTER_SERVICE_HOST: localhost
          REDIS_MASTER_SERVICE_PORT: ${{ job.services.redis.ports[6379] }}
          GOPROXY: https://proxy.golang.org
      - name: upload coverage to codecov
        uses: codecov/codecov-action@v4
        with:
          file: ./profile.cov
  call-docker-build:
    needs: test
    uses: dictyBase/workflows/.github/workflows/docker-build-push.yaml@develop
    secrets: inherit
    with:
      repository: ${{ github.repository }}
      ref: ${{ github.ref_name }}