Skip to content

Update protobuf to 5.27.1 #320

Update protobuf to 5.27.1

Update protobuf to 5.27.1 #320

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: pytest + codecov
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
# runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest]
python-version: [3.6, 3.7, 3.8, 3.x]
# python-version: ['3.x']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Cache pip Ubuntu
uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache pip MacOS
uses: actions/cache@v2
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache pip Windows
uses: actions/cache@v2
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest pytest-cov
python -m pytest --cov=./ --cov-report=xml tests oe_find_sds
# - name: Create a package but do not deploy anywhere
# run: |
# pip install ./
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v1
if: startsWith(runner.os, 'macOS') && matrix.python-version == 3.8
# if: startsWith(runner.os, 'ubuntu')
with:
# CODECOV_TOKEN is repo-specific and it must be copied from codecov.io for the repository
# and stored as a secret in GitHub's repository Settings > Secrets. CODECOV_TOKEN does not
# need to be stored in codecov.io as a secret even though codecov.io provides that feature.
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml # file where pytest-cov will store results
fail_ci_if_error: false # optional (default = false)
verbose: false # optional (default = false)