Skip to content

Commit

Permalink
Fix Tests in Github Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jschram committed Dec 16, 2024
1 parent 56d1d72 commit d2b0233
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .env.testing.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ TELESCOPE_ENABLED=false
SURFCONEXT_ROLE_TEACHER=urn:collab:group:test.surfconext.nl:nl:surfnet:diensten:edutools_test_docent
SURFCONEXT_ROLE_INFORMATION_MANAGER=urn:collab:group:test.surfconext.nl:nl:surfnet:diensten:edutools_test_informatiemanager
SURFCONEXT_ROLE_CONTENT_MANAGER=urn:collab:group:test.surfconext.nl:nl:surfnet:diensten:edutools_test_contentmanager

AWS_ACCESS_KEY_ID=application
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=none
AWS_BUCKET_PUBLIC=sreapp-public
AWS_BUCKET=sreapp-public
AWS_URL='http://127.0.0.1:9000/sreapp'
AWS_URL_PUBLIC='http://127.0.0.1:9000/sreapp-public'
AWS_ENDPOINT=http://127.0.0.1:9000/
AWS_USE_PATH_STYLE_ENDPOINT='true'
23 changes: 14 additions & 9 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ jobs:
sudo systemctl start mysql
mysql --user="root" --password="root" -e "CREATE DATABASE tests_db character set UTF8mb4 collate utf8mb4_bin;"
- name: Setup minio
run: |
docker run -d -p 9000:9000 --name minio \
-e "MINIO_ACCESS_KEY=application" \
-e "MINIO_SECRET_KEY=password" \
-v /tmp/data:/data \
-v /tmp/config:/root/.minio \
minio/minio server /data
export AWS_ACCESS_KEY_ID=application
export AWS_SECRET_ACCESS_KEY=password
export AWS_EC2_METADATA_DISABLED=true
aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://sreapp-public
- name: Set Up PHP and Tools
uses: shivammathur/setup-php@master
with:
Expand All @@ -134,15 +147,7 @@ jobs:
- name: Build Assets
run: ./buildHook.sh $PWD

- name: Run PHPUnit Tests
run: composer test
env:
DB_HOST: localhost
DB_DATABASE: tests_db
DB_USERNAME: root
DB_PASSWORD: root

- name: Run Test Coverage Report
- name: Run Test & Coverage Report
run: ./vendor/bin/phpunit --coverage-clover ./coverage.xml
env:
DB_HOST: localhost
Expand Down

0 comments on commit d2b0233

Please sign in to comment.