diff --git a/.github/workflows/deploy_prerelease.yaml b/.github/workflows/deploy_prerelease.yaml index 9e5dbc05..fea3efc3 100644 --- a/.github/workflows/deploy_prerelease.yaml +++ b/.github/workflows/deploy_prerelease.yaml @@ -9,7 +9,7 @@ on: default: false type: boolean workflow_run: - workflows: ["[STAGING] Pre-Release"] + workflows: ['\[STAGING\] Pre-Release'] types: - completed diff --git a/.github/workflows/deploy_release.yaml b/.github/workflows/deploy_release.yaml index aecd8385..b5a83cd6 100644 --- a/.github/workflows/deploy_release.yaml +++ b/.github/workflows/deploy_release.yaml @@ -9,7 +9,7 @@ on: default: false type: boolean workflow_run: - workflows: ["[PRODUCTION] Release"] + workflows: ['\[PRODUCTION\] Release'] types: - completed diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 7d8268a5..50fe0466 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -1,4 +1,4 @@ -name: "[CI] Run Pytests" +name: "Run Pytests" on: # Run workflow automatically whenever the workflow, app or tests are updated @@ -7,6 +7,7 @@ on: # - .github/workflows/pytest.yaml # Assuming this file is stored in .github/workflows/pytest.yaml # - src/** # - tests/** + workflow_dispatch: pull_request: branches: - main @@ -16,29 +17,33 @@ jobs: name: Run pytests runs-on: ubuntu-latest steps: - - name: generate FR locale - run: sudo locale-gen fr_FR.UTF-8 - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v3 with: - python-version: '3.12' - cache: 'pip' - - name: Lint with Ruff # Running an optional linter step - run: | - pip install ruff - ruff --output-format=github src/ - continue-on-error: true - - name: Install application dependencies - run: | - python -m pip install --upgrade pip - pip install -r src/requirements.txt - - name: Test with pytest - run: | - pip install pytest pytest-cov pytest-mock requests-mock - pytest --cov=src/ --cov-report=xml - - name: Upload coverage reports to Codecov # Optional: Run codecov. Requires: secrets.CODECOV_TOKEN - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - continue-on-error: true + event-type: TEST + # - name: generate FR locale + # run: sudo locale-gen fr_FR.UTF-8 + # - uses: actions/checkout@v4 + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: '3.12' + # cache: 'pip' + # - name: Lint with Ruff # Running an optional linter step + # run: | + # pip install ruff + # ruff --output-format=github src/ + # continue-on-error: true + # - name: Install application dependencies + # run: | + # python -m pip install --upgrade pip + # pip install -r src/requirements.txt + # - name: Test with pytest + # run: | + # pip install pytest pytest-cov pytest-mock requests-mock + # pytest --cov=src/ --cov-report=xml + # - name: Upload coverage reports to Codecov # Optional: Run codecov. Requires: secrets.CODECOV_TOKEN + # uses: codecov/codecov-action@v3 + # env: + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # continue-on-error: true diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..aac127bb --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,13 @@ +name: "TEST" + +on: + workflow_dispatch: + repository_dispatch: + types: [TEST] + +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - run: echo 1 \ No newline at end of file