Resolve linting errors (mypy) and verify tests pass for solenoid.elem… #12
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
# This workflow runs tests and sends a coverage report to Coveralls | |
# Requirements: Calling repo must use pipenv for dependency management, contain a | |
# .python-version file, and contain a Makefile with `make test` and `make coveralls` | |
# commands. | |
name: CI | |
on: push | |
jobs: | |
test: | |
name: Run tests and report coverage | |
runs-on: ubuntu-latest | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get python version | |
run: | | |
python_version=$(cat .python-version) | |
echo "python_version=${python_version}" >> $GITHUB_ENV | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.python_version }} | |
architecture: x64 | |
- name: Install | |
run: | | |
python -m pip install --upgrade pip pipenv | |
pipenv install --dev | |
- name: Run tests and make coverage report | |
run: | | |
make test | |
make coveralls | |
- name: Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
lint: | |
uses: mitlibraries/.github/.github/workflows/python-shared-lint.yml@main |