Create PR template #581
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: CI | |
on: | |
pull_request: { } | |
push: { } | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: [ "3.10", "3.11" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dev requirements | |
run: | | |
pip install -e . | |
pip install coverage pytest | |
- name: Run Tests | |
run: coverage run -m pytest --tb=short -vvv tests/unit | |
- name: Run Coverage | |
run: coverage xml --omit="tests/*" | |
- name: Comment coverage on PR | |
if: github.event_name == 'pull_request' | |
uses: orgoro/[email protected] | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
integration-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: [ "3.10", "3.11" ] | |
env: | |
JELASTIC_TOKEN: ${{ secrets.JELASTIC_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dev requirements | |
run: | | |
pip install -r requirements-test.txt | |
pip install -e . | |
- name: Run Tests | |
run: coverage run -m pytest --tb=short -vvv tests/integration | |
- name: Run Coverage | |
run: coverage report --omit="tests/*" | |
docs: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
needs: | |
- unit-tests | |
- integration-tests | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dev requirements | |
run: | | |
pip install -r requirements-docs.txt | |
pip install -e . | |
- name: Build Docs | |
run: | | |
cd docs | |
make html | |
- name: Deploy Docs | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html |