Moved initial idea to its own folder to rework on the project #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: install-and-test | |
on: [push] | |
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
# `contents` is for permission to the contents of the repository. | |
# `pull-requests` is for permission to pull request | |
permissions: | |
contents: write | |
checks: write | |
pull-requests: write | |
jobs: | |
install-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install uv | |
uv pip install coveralls --system | |
uv pip install -e '.[dev]' --system | |
- name: mypy | |
run: | | |
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional src/pyssmf tests | |
- name: Build coverage file | |
run: | | |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=src tests | tee pytest-coverage.txt | |
- name: Pytest coverage comment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: ./pytest-coverage.txt | |
junitxml-path: ./pytest.xml | |
- name: Submit to coveralls | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
coveralls --service=github | |
build-and-install: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Build the package | |
run: | | |
pip install uv | |
uv pip install --upgrade pip --system | |
uv pip install build --system | |
python -m build --sdist | |
- name: Install the package | |
run: | | |
uv pip install dist/*.tar.gz --system | |
ruff-linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: chartboost/ruff-action@v1 | |
with: | |
args: "check ." | |
ruff-formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: chartboost/ruff-action@v1 | |
with: | |
args: "format . --check --verbose" |