Group pages in react #448
Workflow file for this run
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
name: Quality Tests | |
on: pull_request | |
jobs: | |
changes: | |
name: Check changes | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
backend: ${{ steps.filter.outputs.backend }} | |
frontend: ${{ steps.filter.outputs.frontend }} | |
docs: ${{ steps.filter.outputs.docs }} | |
email_templates: ${{ steps.filter.outputs.email_templates }} | |
steps: | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
backend: | |
- 'backend/**' | |
frontend: | |
- 'frontend/**' | |
docs: | |
- 'docs/**' | |
email_templates: | |
- 'email-templates-generator/**' | |
backend: | |
name: Back End Quality | |
needs: changes | |
if: ${{ needs.changes.outputs.backend == 'true' }} | |
uses: ./.github/workflows/quality-backend.yml | |
secrets: inherit | |
frontend: | |
name: Front End Quality | |
needs: changes | |
if: ${{ needs.changes.outputs.frontend == 'true' }} | |
uses: ./.github/workflows/quality-frontend.yml | |
secrets: inherit | |
email_templates: | |
name: Email Templates Quality | |
needs: changes | |
if: ${{ needs.changes.outputs.email_templates == 'true' }} | |
uses: ./.github/workflows/quality-email-templates.yml | |
secrets: inherit | |
docs: | |
name: Docs Quality | |
needs: changes | |
if: ${{ needs.changes.outputs.docs == 'true' }} | |
uses: ./.github/workflows/quality-docs.yml | |
secrets: inherit | |
final-check: | |
name: Final Check | |
needs: [backend, frontend, docs, email_templates] | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check previous jobs status | |
run: | | |
status=$(echo "${{ needs.backend.result }}" | tr '[:upper:]' '[:lower:]') | |
status+=$(echo " ${{ needs.frontend.result }}" | tr '[:upper:]' '[:lower:]') | |
status+=$(echo " ${{ needs.docs.result }}" | tr '[:upper:]' '[:lower:]') | |
status+=$(echo " ${{ needs.email_templates.result }}" | tr '[:upper:]' '[:lower:]') | |
if [[ "$status" == *"failure"* ]]; then | |
echo "One or more previous jobs failed." | |
exit 1 | |
else | |
echo "All previous jobs succeeded or were skipped." | |
exit 0 | |
fi |