Skip to content

Commit 0e04c19

Browse files
ci: probe localized shell errors in matrix
1 parent ee2d5aa commit 0e04c19

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/tests.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ jobs:
3434
- name: "Spanish"
3535
lang: "es_ES.UTF-8"
3636
tz: "Europe/Madrid"
37+
probe_error: "orden no encontrada"
3738
- name: "Brazilian"
3839
lang: "pt_BR.UTF-8"
3940
tz: "America/Sao_Paulo"
41+
probe_error: ""
4042
- name: "Japanese"
4143
lang: "ja_JP.UTF-8"
4244
tz: "Asia/Tokyo"
45+
probe_error: ""
4346
steps:
4447
- name: Checkout
4548
uses: actions/checkout@v4
@@ -49,9 +52,20 @@ jobs:
4952
- name: Install locales
5053
run: |
5154
sudo apt-get update
52-
sudo apt-get install -y locales
55+
sudo apt-get install -y locales ${{ matrix.lang == 'es_ES.UTF-8' && 'language-pack-es-base' || '' }}
5356
sudo locale-gen "${{ matrix.lang }}"
5457
58+
- name: Probe localized shell error
59+
if: ${{ matrix.probe_error != '' }}
60+
env:
61+
LANG: ${{ matrix.lang }}
62+
LC_ALL: ${{ matrix.lang }}
63+
TZ: ${{ matrix.tz }}
64+
run: |
65+
set -euo pipefail
66+
bash -lc 'invalid_function_name' 2>&1 | tee /tmp/bash-locale-probe.txt || true
67+
grep -q "${{ matrix.probe_error }}" /tmp/bash-locale-probe.txt
68+
5569
- name: Setup Config
5670
run: cp .env.example .env
5771

0 commit comments

Comments
 (0)