From 00786d84801deed797225684e1d211e5557b3510 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 9 Jun 2022 16:41:58 +0200 Subject: [PATCH] Continuous integration of list --- .github/workflows/python-app.yml | 42 ++++++++++++++--------------- .github/workflows/python-deploy.yml | 37 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/python-deploy.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index f0b2e45..a14589d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,7 +1,7 @@ # 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 application +name: Python Tests and Lint on: push: @@ -40,23 +40,23 @@ jobs: - name: Test with pytest run: | pytest --cov-fail-under=100 -o xfail_strict=true --cov-report=term-missing . - 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 . - python -m bootstraparse "example_userfiles" "docs" - - name: deploy - uses: JamesIves/github-pages-deploy-action@v4.3.3 - with: - branch: gh-pages # The branch the action should deploy to. - folder: docs +# 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 . +# python -m bootstraparse "example_userfiles" "docs" +# - name: deploy +# uses: JamesIves/github-pages-deploy-action@v4.3.3 +# with: +# branch: gh-pages # The branch the action should deploy to. +# folder: docs diff --git a/.github/workflows/python-deploy.yml b/.github/workflows/python-deploy.yml new file mode 100644 index 0000000..6160295 --- /dev/null +++ b/.github/workflows/python-deploy.yml @@ -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