From 441be238bd8fa550802d0a838958427ebc2ab0e5 Mon Sep 17 00:00:00 2001 From: Maxim V4S Date: Tue, 13 Aug 2024 10:14:34 +0300 Subject: [PATCH 1/2] ci: add workflows description --- .github/workflows/build.yaml | 5 +++++ .github/workflows/ci.yaml | 8 ++++++++ .github/workflows/release.yaml | 5 +++++ .../workflows/{reusable-buld.yaml => reusable-build.yaml} | 8 ++++++++ 4 files changed, 26 insertions(+) rename .github/workflows/{reusable-buld.yaml => reusable-build.yaml} (80%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dbdeccc3..6b3715b0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,3 +1,8 @@ +# This workflow is used for manual (can be triggered via GitHub web interface) +# build of package archives for distribution. The build workflow +# (.github/workflows/reusable-build.yaml) is triggered for creation wheel and +# sdist package archives. + on: workflow_dispatch diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 43577b8e..8f29ff03 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,3 +1,11 @@ +# This workflow is used for automatically running checks on adding commit to +# pull requests. There are 2 global types of check: frontend and backend. +# Frontend checks include eslint and stylelint checks. Backend checks triggers +# poe (poethepoet) commands: type, lint, format. The commands are defined in +# pyproject.toml. Also, backend checks include tests run. + + + name: Format; lint; type; tests on: pull_request diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9e54fd6a..363855f8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,3 +1,8 @@ +# This workflow is used for creating draft release on GitHub. Firstly the +# build workflow (.github/workflows/reusable-build.yaml) is triggered for +# creation wheel and sdist package archives. Then the draft GitHub release is +# created with attached built python package archives. + name: Create release on: diff --git a/.github/workflows/reusable-buld.yaml b/.github/workflows/reusable-build.yaml similarity index 80% rename from .github/workflows/reusable-buld.yaml rename to .github/workflows/reusable-build.yaml index bd977796..23293aa7 100644 --- a/.github/workflows/reusable-buld.yaml +++ b/.github/workflows/reusable-build.yaml @@ -1,4 +1,12 @@ +# This workflow is used for building qualibrate-app python package in dist +# and wheel formats. It should be noted that firstly the frontend package is +# built. And build frontend files are added to the backend package. Then the +# backand package is built. Built backend package archives is attached to +# workflow run as artifacts. The workflow should only be automatically +# triggered by other workflows (manual build and release). + name: Build python package with built frontend + on: workflow_call jobs: From 2ebef9a311f082b24172f5860127abbb6bdb6459 Mon Sep 17 00:00:00 2001 From: Maxim V4S Date: Tue, 13 Aug 2024 10:33:47 +0300 Subject: [PATCH 2/2] ci(refactor): update workflow names --- .github/workflows/build.yaml | 2 ++ .github/workflows/ci.yaml | 3 +-- .github/workflows/release.yaml | 2 +- .github/workflows/reusable-build.yaml | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6b3715b0..2cc5c03d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,6 +3,8 @@ # (.github/workflows/reusable-build.yaml) is triggered for creation wheel and # sdist package archives. +name: Build python package manually (with built frontend) + on: workflow_dispatch diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8f29ff03..cf2b472d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,9 +4,8 @@ # poe (poethepoet) commands: type, lint, format. The commands are defined in # pyproject.toml. Also, backend checks include tests run. - - name: Format; lint; type; tests + on: pull_request diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 363855f8..9f4ca12d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ # creation wheel and sdist package archives. Then the draft GitHub release is # created with attached built python package archives. -name: Create release +name: Create draft GitHub release on: push: diff --git a/.github/workflows/reusable-build.yaml b/.github/workflows/reusable-build.yaml index 23293aa7..17819595 100644 --- a/.github/workflows/reusable-build.yaml +++ b/.github/workflows/reusable-build.yaml @@ -5,7 +5,8 @@ # workflow run as artifacts. The workflow should only be automatically # triggered by other workflows (manual build and release). -name: Build python package with built frontend +name: + Reusable build python package with built frontend (called by other workflows) on: workflow_call