Skip to content

Create README.en.md - English version (#49) #118

Create README.en.md - English version (#49)

Create README.en.md - English version (#49) #118

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Pytest
on:
push:
branches: ["main", "test"]
pull_request:
branches: ["main", "test"]
jobs:
lint:
runs-on: "ubuntu-latest"
steps:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 black
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with black
run: |
black --verbose --check .
flake8 .
coverage-perf:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v1
- name: Install requirements
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov pytest-benchmark pytest-memray
pip install -r requirements/requirements.txt
- name: Run tests and collect coverage, benchmark
run: |
pytest --cov --verbose -p no:warnings --memray --benchmark-json output.json
- name: Upload coverage reports to Codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${{ secrets.CODECOV_TOKEN }}
- name: Continuous Benchmark
uses: benchmark-action/[email protected]
with:
name: cyeva Benchmark
tool: "pytest"
output-file-path: output.json
github-token: ${{ secrets.OPS_ACTIONS_CI_TOKEN }}
gh-repository: "github.com/caiyunapp/cyeva"
auto-push: true
alert-threshold: "150%"
comment-on-alert: true
fail-on-alert: false
benchmark-data-dir-path: "performance/"
alert-comment-cc-users: "@clarmy"
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
pip install -r requirements/requirements.txt
- name: Test with pytest
run: |
pytest ./tests/functions ./tests/test_issues.py