migrate to gh actions, add tests and publish wheel (#44) #1
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: Tests | |
on: | |
# only run tests when src code changes | |
push: | |
branches: | |
- master | |
paths: | |
- "markdownextradata/**" | |
- "test/**" | |
- ".github/workflows/tests.yml" | |
pull_request: | |
branches: | |
- master | |
paths: | |
- "markdownextradata/**" | |
- "test/**" | |
- ".github/workflows/tests.yml" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run-pytest: | |
name: Run pytest tests | |
# NOTE: we can change back to ubuntu-latest if we drop support for py3.6 | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install mkdocs pyyaml pytest click | |
python -m pip install -e . | |
- name: Run pytest | |
run: | | |
pytest test -s |