Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable tests on CI #25

Merged
merged 3 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading