ci: update CI workflows and add CI workflow (#2498)

* chore(workflows): update lint-js.yml and lint-py.yml workflows to include support for workflow_call and workflow_dispatch events with optional branch input for checkout

* chore(docs_test.yml): update workflow triggers to include workflow_call and workflow_dispatch events

* ci(python_test.yml): update workflow to trigger on workflow_dispatch event and add support for optional branch input parameter to checkout specific branch for testing

* chore(typescript_test.yml): remove unnecessary pull_request event types to streamline workflow configuration

* feat(ci.yml): add CI workflow for automated testing and linting of backend, frontend, and documentation code

* chore: update release.yml to include CI workflow for automated testing and linting

* chore(typescript_test.yml): remove unnecessary 'if: always()' condition from merge-reports job

* chore(ci): add typescript_test.yml to the list of files included in the frontend job for CI workflow

* chore(ci.yml): fix typo in file path for typescript_test.yml in the frontend job of CI workflow

* chore(ci.yml): update path-filter job in CI workflow to include frontend tests and fix typo in file path for typescript_test.yml

* chore(ci.yml): add concurrency configuration to improve workflow efficiency

fix(ci.yml): include tests output in the filter paths job to run frontend tests when needed

* chore(ci.yml): update CI workflow to remove lint-frontend job

* chore(ci.yml): restructure CI workflow to improve readability and maintainability
feat(ci.yml): add separate jobs for frontend tests, backend linting, and docs build to enhance testing coverage
feat(ci.yml): introduce a final job 'CI Success' to check the status of all previous jobs and provide a summary of the CI pipeline execution

* ci(ci.yml): add dependencies between jobs to ensure proper execution order and avoid unnecessary runs

* chore(ci.yml): reformat YAML file for better readability and consistency in indentation
feat(ci.yml): add support for running backend tests, frontend tests, linting backend code, and testing docs build in CI workflow
feat(ci.yml): introduce a final step 'CI Success' to check the status of all previous jobs and exit with appropriate code based on their results

* chore(ci.yml): Remove concurrency configuration and cancel-in-progress option from lint-js, lint-py, python_test, and style-check-py workflows

* chore(ci.yml): Update pull_request event types in js_autofix.yml workflow to remove auto_merge_enabled

* chore: Remove concurrency configuration and cancel-in-progress option from typescript_test.yml workflow

* refactor: change add store key inside test

* ♻️ (tests): remove hardcoded API key and use environment variable
 (tests): add environment variable check to skip tests if not set

*  (store-shard-2.spec.ts): add test skip condition for STORE_API_KEY
 (store-shard-2.spec.ts): implement test for sharing component with API key

*  (store-shard-2.spec.ts): update navigation step in end-to-end test to click "My Collection" instead of going to home page

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-07-03 12:24:35 -03:00 committed by GitHub
commit a3bf1c4502
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 233 additions and 137 deletions

View file

@ -2,15 +2,15 @@ name: Python tests
on:
workflow_call:
pull_request:
types: [opened, synchronize, reopened, auto_merge_enabled]
branches: [main]
workflow_dispatch:
inputs:
branch:
description: "(Optional) Branch to checkout"
required: false
type: string
env:
POETRY_VERSION: "1.8.2"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.workflow, 'Release')}}
jobs:
build:
@ -26,6 +26,8 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref }}
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_caching"
with: