diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index a78e8b7..e171f18 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -56,11 +56,24 @@ jobs: path: . options: --exclude=vendor - - name: create empty .env file. - run: echo "" > tests/Helpers/.env + - name: Cache testing env file + uses: actions/cache@v4 + id: testing-env-cache + with: + path: tests/Helpers/.env + key: ${{ runner.os }}-testing-env-${{ hashFiles('tests/Helpers/.env') }} + + - if: ${{ steps.testing-env-cache.outputs.cache-hit != 'true' }} + name: Prepare environment file + env: + TESTING_ENV_FILE_CONTENT: ${{ secrets.TESTING_ENV_FILE_CONTENT }} + run: echo $TESTING_ENV_FILE_CONTENT | base64 --decode > tests/Helpers/.env - uses: php-actions/phpstan@v3 with: path: src/AuthProvider src/Common level: 5 memory_limit: 2048m + + - name: Integration tests + run: composer run-script test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ee712bd..29e683a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,6 +41,22 @@ jobs: path: . options: --exclude=vendor + - name: Cache testing env file + uses: actions/cache@v4 + id: testing-env-cache + with: + path: tests/Helpers/.env + key: ${{ runner.os }}-testing-env-${{ hashFiles('tests/Helpers/.env') }} + + - if: ${{ steps.testing-env-cache.outputs.cache-hit != 'true' }} + name: Prepare environment file + env: + TESTING_ENV_FILE_CONTENT: ${{ secrets.TESTING_ENV_FILE_CONTENT }} + run: echo $TESTING_ENV_FILE_CONTENT | base64 --decode > tests/Helpers/.env + + - name: Integration tests + run: composer run-script test + release: environment: release needs: