Skip to content

Commit

Permalink
Merge pull request #1110 from NFDI4Chem/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
NishaSharma14 authored Mar 14, 2024
2 parents 8c8a8fc + 988ddfd commit 644b008
Show file tree
Hide file tree
Showing 7 changed files with 3,007 additions and 2,020 deletions.
2 changes: 1 addition & 1 deletion .env.ci.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=pgsql
DB_HOST=postgres
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=nmrxiv
DB_USERNAME=postgres
Expand Down
33 changes: 23 additions & 10 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ env:
REPOSITORY_NAMESPACE: nfdi4chem

jobs:
# php-unit-test:
# uses: NFDI4Chem/nmrxiv/.github/workflows/test.yml@development

php-unit-test:
name: Run test
name: Run tests
runs-on: ubuntu-latest
container:
image: kirschbaumdevelopment/laravel-test-runner:8.2


services:
postgres:
image: postgres:13
Expand All @@ -39,12 +34,18 @@ jobs:

steps:
- uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
fetch-depth: 1
php-version: '8.2'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_pgsql, bcmath, soap, intl, gd, exif, iconv
coverage: pcov

- name: Install composer dependencies
run: |
composer install --ignore-platform-reqs
- name: Prepare Laravel Application
run: |
php -r "file_exists('.env') || copy('.env.ci.test', '.env');"
Expand All @@ -60,12 +61,24 @@ jobs:
php artisan key:generate
php artisan migrate --seed
- name: Install pcov
run: |
sudo apt-get update
sudo apt-get -y install php-pcov
- name: Install front-end dependencies
run: |
npm install
npm run build
- name: Run Test
run: php artisan test --parallel
- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}

setup-build-publish-deploy:
name: Build & deploy to development
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"require": {
"php": "^8.2",
"aws/aws-sdk-php": "^3.208",
"codecov/laravel-codecov-opentelemetry": "dev-non_null_release_id",
"darkaonline/l5-swagger": "^8.5",
"doctrine/dbal": "^3.1",
"guzzlehttp/guzzle": "^7.4",
Expand All @@ -31,6 +32,7 @@
"mpociot/versionable": "^4.3",
"nfdi4chem/orcid": "master",
"owen-it/laravel-auditing": "^13.5.1",
"phpunit/php-code-coverage": "^10.1",
"predis/predis": "^2.2",
"spatie/laravel-backup": "^8.3",
"spatie/laravel-cookie-consent": "^3.2.1",
Expand Down
Loading

0 comments on commit 644b008

Please sign in to comment.