From f80229c3de5e0b675a858db5f2747583b68d84ee Mon Sep 17 00:00:00 2001 From: Achmad Hadi Kurnia Date: Thu, 4 Jul 2024 16:26:35 +0700 Subject: [PATCH] chore(tests): update phpunit.xml.dist --- .github/workflows/run-tests.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7c8cbdb..7d24c2e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -59,15 +59,27 @@ jobs: - name: Add secrets to phpunit.xml run: | - sed -i 's/{{SIASN_MODE}}/${{ secrets.SIASN_MODE }}/g' phpunit.xml - sed -i 's/{{SIASN_APIM_USERNAME}}/${{ secrets.SIASN_APIM_USERNAME }}/g' phpunit.xml - sed -i 's/{{SIASN_APIM_PASSWORD}}/${{ secrets.SIASN_APIM_PASSWORD }}/g' phpunit.xml - sed -i 's/{{SIASN_SSO_CLIENT_ID}}/${{ secrets.SIASN_SSO_CLIENT_ID }}/g' phpunit.xml - sed -i 's/{{SIASN_SSO_USERNAME}}/${{ secrets.SIASN_SSO_USERNAME }}/g' phpunit.xml - sed -i 's/{{SIASN_SSO_PASSWORD}}/${{ secrets.SIASN_SSO_PASSWORD }}/g' phpunit.xml - sed -i 's/{{SIASN_CONST_INSTANSI_ID}}/${{ secrets.SIASN_CONST_INSTANSI_ID }}/g' phpunit.xml - sed -i 's/{{SIASN_CONST_SATUAN_KERJA_ID}}/${{ secrets.SIASN_CONST_SATUAN_KERJA_ID }}/g' phpunit.xml - sed -i 's/{{SIASN_CONST_PNS_ORANG_ID}}/${{ secrets.SIASN_CONST_PNS_ORANG_ID }}/g' phpunit.xml + if [[ "$RUNNER_OS" == "Windows" ]]; then + sed `-i 's/{{SIASN_MODE}}/${{ secrets.SIASN_MODE }}/g' phpunit.xml + sed -i 's/{{SIASN_APIM_USERNAME}}/${{ secrets.SIASN_APIM_USERNAME }}/g' phpunit.xml + sed -i 's/{{SIASN_APIM_PASSWORD}}/${{ secrets.SIASN_APIM_PASSWORD }}/g' phpunit.xml + sed -i 's/{{SIASN_SSO_CLIENT_ID}}/${{ secrets.SIASN_SSO_CLIENT_ID }}/g' phpunit.xml + sed -i 's/{{SIASN_SSO_USERNAME}}/${{ secrets.SIASN_SSO_USERNAME }}/g' phpunit.xml + sed -i 's/{{SIASN_SSO_PASSWORD}}/${{ secrets.SIASN_SSO_PASSWORD }}/g' phpunit.xml + sed -i 's/{{SIASN_CONST_INSTANSI_ID}}/${{ secrets.SIASN_CONST_INSTANSI_ID }}/g' phpunit.xml + sed -i 's/{{SIASN_CONST_SATUAN_KERJA_ID}}/${{ secrets.SIASN_CONST_SATUAN_KERJA_ID }}/g' phpunit.xml + sed -i '`s/{{SIASN_CONST_PNS_ORANG_ID}}/${{ secrets.SIASN_CONST_PNS_ORANG_ID }}/g' phpunit.xml + else + sed -i 's@{{SIASN_MODE}}@${{ secrets.SIASN_MODE }}@g' phpunit.xml + sed -i 's@{{SIASN_APIM_USERNAME}}@${{ secrets.SIASN_APIM_USERNAME }}@g' phpunit.xml + sed -i 's@{{SIASN_APIM_PASSWORD}}@${{ secrets.SIASN_APIM_PASSWORD }}@g' phpunit.xml + sed -i 's@{{SIASN_SSO_CLIENT_ID}}@${{ secrets.SIASN_SSO_CLIENT_ID }}@g' phpunit.xml + sed -i 's@{{SIASN_SSO_USERNAME}}@${{ secrets.SIASN_SSO_USERNAME }}@g' phpunit.xml + sed -i 's@{{SIASN_SSO_PASSWORD}}@${{ secrets.SIASN_SSO_PASSWORD }}@g' phpunit.xml + sed -i 's@{{SIASN_CONST_INSTANSI_ID}}@${{ secrets.SIASN_CONST_INSTANSI_ID }}@g' phpunit.xml + sed -i 's@{{SIASN_CONST_SATUAN_KERJA_ID}}@${{ secrets.SIASN_CONST_SATUAN_KERJA_ID }}@g' phpunit.xml + sed -i 's@{{SIASN_CONST_PNS_ORANG_ID}}@${{ secrets.SIASN_CONST_PNS_ORANG_ID }}@g' phpunit.xml + fi - name: Execute tests run: vendor/bin/pest --ci