-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #404 from hypsug0/github_actions
Some new GitHub actions
- Loading branch information
Showing
104 changed files
with
989 additions
and
660 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"repoId": "2b14cce7-db7a-476a-a8b9-f41927e3728b", | ||
"lastSync": 0 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,4 @@ exclude = | |
build, | ||
dist, | ||
migrations | ||
max-complexity = 10 | ||
max-complexity = 10 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: "📚 Documentation" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- ".github/workflows/documentation.yml" | ||
- "docs/*/**" | ||
tags: | ||
- "*" | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- ".github/workflows/documentation.yml" | ||
- docs/**/* | ||
|
||
workflow_dispatch: | ||
|
||
# Allow one concurrent deployment per branch/pr | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHON_VERSION: 3.11 | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run image | ||
uses: abatilo/actions-poetry@v3 | ||
#------------------------------------ | ||
# ----- Install dependencies ----- | ||
#------------------------------------ | ||
- name: Install dependencies | ||
run: | | ||
cd backend | ||
poetry install --only=docs | ||
- name: Build doc using Sphinx | ||
run: | | ||
cd backend | ||
poetry run sphinx-build -b html -d ../docs/_build/cache -j auto ../docs ../docs/_build/html | ||
- name: Save build doc as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentation | ||
path: docs/_build/html/* | ||
if-no-files-found: error | ||
retention-days: 30 | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') | ||
with: | ||
path: docs/_build/html/ | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') | ||
uses: actions/deploy-pages@v4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: "✅ Linter" | ||
|
||
on: | ||
push: | ||
branches: [master, dev] | ||
paths: | ||
- "backend/**/*.py" | ||
- "frontend/*" | ||
|
||
pull_request: | ||
branches: [master, dev] | ||
paths: | ||
- "backend/**/*.py" | ||
- "frontend/*" | ||
|
||
env: | ||
BACKEND_FOLDER: "backend" | ||
FRONTEND_FOLDER: "frontend" | ||
PYTHON_VERSION: 3.9 | ||
|
||
jobs: | ||
lint-py: | ||
name: Python 🐍 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install project requirements | ||
run: | | ||
python -m pip install -U pip setuptools wheel | ||
python -m pip install -U flake8 | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 ${{ env.BACKEND_FOLDER }} --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. | ||
flake8 ${{ env.BACKEND_FOLDER }} --count --exit-zero --statistics | ||
lint-node: | ||
name: NodeJS 🐍 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "${{ env.FRONTEND_FOLDER }}/.nvmrc" | ||
- run: cd ${{ env.FRONTEND_FOLDER }} && npm ci | ||
- run: cd ${{ env.FRONTEND_FOLDER }} && npm run lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
exclude: ".venv|__pycache__|tests/dev/|tests/fixtures/" | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ["--maxkb=500"] | ||
- id: check-case-conflict | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: fix-encoding-pragma | ||
args: [--remove] | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.3.0 | ||
hooks: | ||
- id: black | ||
|
||
# - repo: https://github.com/pycqa/isort | ||
# rev: 5.13.2 | ||
# hooks: | ||
# - id: isort | ||
# args: ["--profile", "black", "--filter-files"] | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
files: ^pyqgis_resource_browser/.*\.py$ | ||
additional_dependencies: ["flake8-qgis<2"] | ||
args: | ||
[ | ||
"--config=setup.cfg", | ||
"--select=E9,F63,F7,F82,QGS101,QGS102,QGS103,QGS104,QGS106", | ||
] | ||
|
||
ci: | ||
autoupdate_schedule: quarterly | ||
skip: [] | ||
submodules: false |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
tests | ||
.venv | ||
__pycache__ | ||
__pycache__ |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# Moteur de la plateforme | ||
# Moteur de la plateforme | ||
|
||
Déployé avec le framework python Flask | ||
|
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 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 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 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
Oops, something went wrong.