Skip to content

#545 add membrane #1005

#545 add membrane

#545 add membrane #1005

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
env:
PACKAGE_NAME: neclib
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Install Poetry
run: pip install poetry
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
id: dependency
run: poetry install
env:
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
- name: Lint by Flake8
id: lint
if: ${{ always() }}
run: poetry run flake8 docs tests ${PACKAGE_NAME}
- name: Format by Black
id: format
if: ${{ always() }}
run: poetry run black --check docs tests ${PACKAGE_NAME}
- name: Test by pytest
id: test
if: ${{ always() }}
run: poetry run pytest -n auto --cov --cov-report xml -v tests
- name: Write workflow summary
if: ${{ always() }}
run: |
echo -e '# Summary\n\n| step | status |\n| --- | --- |' >> $GITHUB_STEP_SUMMARY
echo "| Dependency Installation | \`${{ steps.dependency.outcome }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Code Error Check | \`${{ steps.lint.outcome }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Code Format | \`${{ steps.format.outcome }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Test Run | \`${{ steps.test.outcome }}\` |" >> $GITHUB_STEP_SUMMARY
- name: Upload code coverage report
if: ${{ matrix.python-version == '3.10' }}
uses: codecov/codecov-action@v3