Thanks to visit codestin.com
Credit goes to github.com

Skip to content

update README and GH workflow test file for python version #31 #83

update README and GH workflow test file for python version #31

update README and GH workflow test file for python version #31 #83

Workflow file for this run

name: Python Test
on:
pull_request:
types: [opened, synchronize]
branches:
- master
jobs:
test-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update python=3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-test.txt
pip install -e .
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 ./src/ --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./src/ --exclude ./src/parser/ply --indent-size 2 --max-line-length 256 --count --exit-zero --max-complexity=15 --statistics
- name: Test with pytest
run: |
pytest --doctest-modules --junitxml=junit/test-results.xml --cov=src --cov-report=xml --cov-report=html
# - name: Test with pytest
# run: |
# coverage run -m pytest
# - name: Generate Coverage Report
# run: |
# coverage report -m
- name: HTML Preview
id: html_preview
uses: pavi2410/html-preview-action@v4
with:
html_file: 'htmlcov/index.html'