✨ Re-add an error boundary #2439
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
# Generates an artifact containing the result of the translations status of the UI. | |
# | |
# TODO: to factorize with the model's CI. | |
name: Generate PR artifact | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
push: | |
branches: | |
- '!main' | |
- '!preprod' | |
jobs: | |
compile: | |
runs-on: ubuntu-22.04 | |
outputs: | |
check-ui-result: ${{ steps.check-ui.outputs.result }} | |
check-faq-result: ${{ steps.check-faq.outputs.result }} | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git log | head && git status | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'yarn' | |
- run: yarn install --immutable | |
shell: bash | |
- run: yarn ui:check | |
- run: yarn faq:check | |
- id: check-ui | |
run: | | |
# Checks the translation of the UI's texts | |
body="$(yarn ui:check --markdown 2> /dev/null | tail --lines=+7 | head --lines=-1)" | |
body="${body//'%'/'%25'}" | |
body="${body//$'\n'/'%0A'}" | |
body="${body//$'\r'/'%0D'}" | |
echo "::set-output name=result::${body}" | |
- id: check-faq | |
run: | | |
# Checks the translation of FAQ's questions | |
body="$(yarn faq:check --markdown 2> /dev/null | tail --lines=+3 | head --lines=-1)" | |
body="${body//'%'/'%25'}" | |
body="${body//$'\n'/'%0A'}" | |
body="${body//$'\r'/'%0D'}" | |
echo "::set-output name=result::${body}" | |
upload-artifact: | |
runs-on: ubuntu-22.04 | |
needs: compile | |
steps: | |
- name: Create artifact | |
run: | | |
mkdir -p artifacts | |
echo " | |
<h1 align="center">Report for the pull request #${{ github.event.pull_request.number }}</h1> | |
--- | |
### :globe_with_meridians: Translation status | |
#### UI's texts | |
${{ needs.compile.outputs.check-ui-result }} | |
#### FAQ's questions | |
${{ needs.compile.outputs.check-faq-result }} | |
> _You will find more information about the translation in the dedicated file._ | |
" > artifacts/result.md | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pr_message | |
path: artifacts/result.md |