Continuous integration of list

This commit is contained in:
Maximilien Rigaut 2022-06-09 16:41:58 +02:00
parent d1f4eaa6f2
commit 00786d8480
No known key found for this signature in database
GPG Key ID: 4F14B23709ADA5B1
2 changed files with 58 additions and 21 deletions

View File

@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python # This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application name: Python Tests and Lint
on: on:
push: push:
@ -40,23 +40,23 @@ jobs:
- name: Test with pytest - name: Test with pytest
run: | run: |
pytest --cov-fail-under=100 -o xfail_strict=true --cov-report=term-missing . pytest --cov-fail-under=100 -o xfail_strict=true --cov-report=term-missing .
deployment: # deployment:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
environment: production # environment: production
steps: # steps:
- uses: actions/checkout@v2 # - uses: actions/checkout@v2
- name: Set up Python 3.10 # - name: Set up Python 3.10
uses: actions/setup-python@v2 # uses: actions/setup-python@v2
with: # with:
python-version: "3.10" # python-version: "3.10"
- name: Build the application # - name: Build the application
run: | # run: |
python -m pip install --upgrade pip # python -m pip install --upgrade pip
pip install -r requirements.txt # pip install -r requirements.txt
pip install -e . # pip install -e .
python -m bootstraparse "example_userfiles" "docs" # python -m bootstraparse "example_userfiles" "docs"
- name: deploy # - name: deploy
uses: JamesIves/github-pages-deploy-action@v4.3.3 # uses: JamesIves/github-pages-deploy-action@v4.3.3
with: # with:
branch: gh-pages # The branch the action should deploy to. # branch: gh-pages # The branch the action should deploy to.
folder: docs # folder: docs

37
.github/workflows/python-deploy.yml vendored Normal file
View File

@ -0,0 +1,37 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python Deployment
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
deployment:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Build the application
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install pydoctor
python -m bootstraparse "example_userfiles" "docs"
- name: Build the documentation
run: |
pydoctor --make-html --html-output=docs/apidoc src/bootstraparse/
- name: deploy
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs