Skip to content

change cov command #115

change cov command

change cov command #115

Workflow file for this run

name: Workflow for Codecov example-python
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: bazelbuild/setup-bazelisk@v2
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install -r requirements.txt
- name: give wrapper permission
run: chmod +x app/projectA/codecov_wrapper.sh
- name: run tests by bazel and generate coverage
run: |
python -m pip install --upgrade pip
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install codecov-cli
echo "$GCP_CREDENTIALS" > service.json
echo "-----"
bazel build //app/...
bazel coverage --run_under //app/projectA:codecov_wrapper.sh \
--test_output=all \
--action_env=GIT_DIR=${PWD}/$(git rev-parse --git-dir) \
--action_env=CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} \
--combined_report=lcov //app/...
env:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}