Split GH Actions and fix variable reference in Customization class.

This commit is contained in:
Buster Neece 2019-08-21 18:19:09 -05:00
parent 0953182033
commit ed835051e2
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
2 changed files with 6 additions and 3 deletions

View File

@ -9,8 +9,8 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Run test suite
- name: Set up test environment
run: |
cp azuracast.sample.env azuracast.env
cp docker-compose.sample.yml docker-compose.yml
@ -18,6 +18,9 @@ jobs:
chmod 777 tests/_output/
docker-compose build web
docker-compose run --user="azuracast" --rm web azuracast_install
- name: Run test suite
run: |
docker-compose run --user="azuracast" --rm web composer test
- name: Echo test output directory

View File

@ -120,7 +120,7 @@ class Customization
// Use approximate match if available.
foreach ($supported_locales as $lang_code => $lang_name) {
if (strcmp(substr($browser_locale, 0, 2), substr($lang_code, 0, 2)) == 0) {
if (strpos($exact_locale, substr($lang_code, 0, 2)) === 0) {
return $lang_code;
}
}