dictyBase/modware-annotation

View on GitHub
.github/workflows/testcov.yml

Summary

Maintainability
Test Coverage
name: Test coverage
on: [pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    services:
      arangodb:
        image: arangodb:3.10.9
        env:
          ARANGO_ROOT_PASSWORD: rootpass
        ports:
          - 8529/tcp
    steps:
      - name: set up golang
        uses: actions/setup-go@v5
        with:
          go-version: '~1.22'
      - run: go version
      - name: check out code
        uses: actions/checkout@v4
      - name: unit test
        run: go test -shuffle on -covermode=atomic -coverprofile=profile.cov -v ./...
        env:
          ARANGO_USER: root
          ARANGO_PASS: rootpass
          ARANGO_HOST: localhost
          ARANGO_PORT: ${{ job.services.arangodb.ports[8529] }}
          GOPROXY: https://proxy.golang.org
      - name: upload coverage to codecov
        uses: codecov/codecov-action@v4
        with:
          file: ./profile.cov
          token: ${{ secrets.CODECOV }}