From b5438d246139946ade2920a3ebfbbbd9ec6ae0b4 Mon Sep 17 00:00:00 2001 From: Jonathan Zernik Date: Sat, 2 Oct 2021 01:09:51 -0700 Subject: [PATCH] Add codecov to github workflow (#1465) * Add codecov to github workflow * Include setup python and tox in github workflow * Install tox in github workflow test step * Add protoc install to github ci * Call coverage directly in github ci * Install requirements-dev in github ci * Call make gen-protos in github ci before pytest * Install tox before run tests * Call coverage xml before codecov upload * Use codecov token * Don't use codecov token --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2af6325..c5051b9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,25 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Install Protoc + uses: arduino/setup-protoc@v1 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + pip install -r requirements.txt + pip install -r requirements-dev.txt + pip install tox + - name: Run tests and collect coverage + run: | + make gen-protos + coverage run -m pytest tests + coverage xml + - + name: Coverage + uses: codecov/codecov-action@v2 - name: Docker meta id: docker_meta