forked from codecov/example-python
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (29 loc) · 1.02 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
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/...