phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

Error: Locales is not getting picked in php-unit with php-actions.

Open ahmedkhan847 opened this issue 1 year ago • 2 comments

So I was moving to php-actions/phpunit since I am also using the composer package from you guys. But when I am running my GA with it my locales is not getting picked while running the tests. Although I am setting the locales during my build:

- name: Set Locales
        run: |
          sudo sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
          sudo sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen
          sudo sed -i -e 's/# nl_NL.UTF-8 UTF-8/nl_NL.UTF-8 UTF-8/' /etc/locale.gen
          sudo dpkg-reconfigure --frontend=noninteractive locales

But whenever I am running tests they are not getting picked. do I need to add some extension.

- name: PHPUnit Testing
        uses: php-actions/phpunit@v3
        with:
          version: 8.5.2
          php_version: "7.2"
          php_extensions: mongodb imagick soap bcmath gd exif json mysqli pcntl pdo_mysql zip pcov
          configuration: phpunit.xml.dist-workflow
          memory_limit: "1G"
          coverage_clover: coverage.xml

Any idea how can I fix it?

ahmedkhan847 avatar Apr 21 '23 14:04 ahmedkhan847

Will look into this for you soon.

g105b avatar Apr 24 '23 10:04 g105b

#57 will fix this issue when it is implemented. Your locale.gen functions are being run on the Github Actions workspace, but they are not being run within the PHPUnit container.

g105b avatar Sep 18 '23 21:09 g105b