Skip to content

Added download cli cmd #1538

Added download cli cmd

Added download cli cmd #1538

name: Python Package CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
python-version:
- "3.9"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Create and Activate Virtual Environment
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
python -m venv venv
source venv/Scripts/activate
else
python3 -m venv venv
source venv/bin/activate
fi
- name: Set up Homebrew
if: matrix.os == 'macos-latest'
uses: Homebrew/actions/setup-homebrew@master
- name: Install PyICU dependencies
if: matrix.os == 'macos-latest'
run: |
brew install icu4c
# Configure PATH & PKG_CONFIG_PATH as in https://gitlab.pyicu.org/main/pyicu.
export PATH="$(brew --prefix)/opt/icu4c/bin:$(brew --prefix)/opt/icu4c/sbin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix)/opt/icu4c/lib/pkgconfig"
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with pylint
run: |
# Only report linting, do not fail ci run.
pylint $(git ls-files '*.py') --exit-zero
- name: Test with pytest
run: |
pytest
- name: Test coverage with pytest-cov
run: |
pytest --cov=src