Skip to content

finish first draft npy_to_mesh #127

finish first draft npy_to_mesh

finish first draft npy_to_mesh #127

Workflow file for this run

name: tests
# reference:
# https://github.com/pybind/python_example/blob/master/.github/workflows/pip.yml
#on: [push]
on:
push:
paths:
- '**.py'
jobs:
build:
strategy:
max-parallel: 2
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
# platform: [macos-latest]
# platform: [windows-latest, macos-latest]
# platform: [ubuntu-latest, macos-latest]
# python-version: [3.9.5, 3.10.0]
# python-version: [3.9.5]
# python-version: [3.9]
# python-version: [3.7]
python-version: [3.11]
# python-version: [3.10.0]
#python-version: [3.9, 3.10]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
# - name: Test with unittest
- name: Test with pytest
run: |
pytest -v
- name: Generate coverage report
run: |
pytest --cov=atmesh --cov-report=xml
- name: Upload coverage to Codecov
# https://github.com/codecov/codecov-action/blob/master/README.md
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# files: ./coverage1.xml,./coverage2.xml # optional
files: ./coverage.xml
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
- name: Test with Black
run: |
black --check src/atmesh --diff
black --check tests --diff
- name: Test with flake8
run: |
flake8 src/atmesh --ignore E203,E501,W503 --statistics
flake8 tests --ignore E203,E501,W503 --statistics
# E203 whitespace before ':'
# E501 line length exceeds 79 characters
# W503 line break occurred before a binary operator
# flake8 . --statistics