#
# Copyright (c) 2019-2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
#   Red Hat, Inc. - initial API and implementation

name: Code Coverage Report
on: [push]
jobs:
  build-and-deploy:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.1
        with:
          persist-credentials: false
      - name: Submit code coverage results
        run: |
         echo "" > coverage.txt
         export CHE_WORKSPACE_ID=test_id; go test -v ./... -coverprofile coverage.txt
         bash <(curl -s https://codecov.io/bash)
