diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml index 71fcf2f0..f5d93492 100644 --- a/.github/workflows/codecov.yaml +++ b/.github/workflows/codecov.yaml @@ -1,5 +1,45 @@ -- name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - env: - token: ${{ secrets.CODECOV_TOKEN }} - slug: machinefi/sprout +name: Build and Test +on: + push: + branches: + - * + pull_request: + +jobs: + + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.12 + + - name: Check out code + uses: actions/checkout@v1 + + - name: Run Unit tests. + run: go test ./... -coverprofile cover.out -covermode=atomic + + - name: Upload Coverage report to CodeCov + uses: codecov/codecov-action@v1.0.0 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: ./cover.out + + #build: + # name: Build + # runs-on: ubuntu-latest + # needs: [lint, test] + # steps: + # - name: Set up Go + # uses: actions/setup-go@v1 + # with: + # go-version: 1.12 + + # - name: Check out code + # uses: actions/checkout@v1 + + # - name: Build + # run: make build \ No newline at end of file