config gcs #109
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
bazel coverage --remote_cache=https://storage.googleapis.com/bazel-test-dana \ | |
--google_credentials=service.json | |
--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 }} |