Skip to content

Commit

Permalink
Merge pull request #59 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
Deploy 12/12/2024
  • Loading branch information
attiks authored Dec 11, 2023
2 parents c4e9b9f + 5f4f0b8 commit 2ea4858
Show file tree
Hide file tree
Showing 51 changed files with 2,370 additions and 1,513 deletions.
2 changes: 1 addition & 1 deletion .docksal/docksal.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DOCKSAL_STACK=default
# This will prevent images from being updated when Docksal is updated
#WEB_IMAGE='docksal/web:2.1-apache2.4'
#DB_IMAGE='docksal/db:1.1-mysql-5.7'
#CLI_IMAGE='docksal/cli:2.1-php7.1'
CLI_IMAGE='docksal/cli:php8.2-build'

# Override virtual host (matches project folder name by default)
#VIRTUAL_HOST=api-test.docksal.site
Expand Down
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8&charset=utf8mb4"
# DATABASE_URL="mysql://user:user@db/default?charset=utf8"
DATABASE_URL="mysql://user:[email protected]/test?charset=utf8"
# DATABASE_URL="mysql://user:[email protected]/test?charset=utf8"
DATABASE_URL="mysql://ocha_api:ocha_api@mysql/ocha_api?charset=utf8"
###< doctrine/doctrine-bundle ###

###> symfony/messenger ###
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/composer-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run Composer Update

on:
schedule:
- cron: '30 5 * * 4'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Update The Thing
id: update-action
uses: UN-OCHA/actions/composer-update@main
with:
github_access_token: ${{ secrets.PAT }}
patch_branch: 'develop'
patch_packages: 'symfony/* api-platform/*'
patch_maintainers: ${{ vars.DRUPAL_MAINTAINERS }}
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel_name: ${{ vars.SLACK_CHANNEL }}
16 changes: 8 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ jobs:
env:
fail-fast: true

- name: Package Security
id: security
- name: Composer Audit
id: audit
uses: cafuego/command-output@main
with:
run: |
curl -L -o ./bin/local-php-security-checker https://github.com/fabpot/local-php-security-checker/releases/download/v1.0.0/local-php-security-checker_1.0.0_linux_amd64
chmod +x ./bin/local-php-security-checker
./bin/local-php-security-checker
composer audit
env:
fail-fast: true

Expand Down Expand Up @@ -122,6 +120,8 @@ jobs:
docker-compose -f tests/docker-compose.yml exec -w /srv/www -T site ./bin/console doctrine:database:drop --force
docker-compose -f tests/docker-compose.yml exec -w /srv/www -T site ./bin/console doctrine:database:create --if-not-exists -n
docker-compose -f tests/docker-compose.yml exec -w /srv/www -T site ./bin/console doctrine:schema:create -n
docker-compose -f tests/docker-compose.yml exec -w /srv/www -T site ./bin/console netbrothers:version --drop-version -n
docker-compose -f tests/docker-compose.yml exec -w /srv/www -T site ./bin/console netbrothers:version -n
docker-compose -f tests/docker-compose.yml exec -w /srv/www -T site ./bin/console hautelook:fixtures:load -n
docker-compose -f tests/docker-compose.yml exec -w /srv/www -T site ./bin/console cache:clear
env:
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = `#### Composer Validate \`${{ steps.validate.outcome }}\`
#### PHP Security \`${{ steps.security.outcome }}\`
#### Composer Audit \`${{ steps.audit.outcome }}\`
#### PHP Lint \`${{ steps.lint.outcome }}\`
#### Docker Build \`${{ steps.build.outcome }}\`
#### Environment Setup \`${{ steps.docker.outcome }}\`
Expand All @@ -183,9 +183,9 @@ jobs:
\`\`\`${{ steps.versions.outputs.stdout }}\`\`\`
</details>
<details><summary>PHP Security</summary>
<details><summary>Composer Audit</summary>
\`\`\`${{ steps.security.outputs.stdout }}\`\`\`
\`\`\`${{ steps.audit.outputs.stdout }}\`\`\`
</details>
<details><summary>Config Lint</summary>
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Variables. Yes.
DOCKER=docker
TAG=8.1-stable
NODE_ENV=dev

# The main build recipe.
build: clean
$(DOCKER) build \
--build-arg BRANCH_ENVIRONMENT=$(NODE_ENV) \
--build-arg TAG=$(TAG) \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VCS_URL=`git config --get remote.origin.url | sed 's#[email protected]:#https://github.com/#'` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
- ~~batch endpoint~~
- ~~extra fields as json blob~~
- ~~add service name in header~~
- ~~test version~~
- add plain post to KeyFigures?
- add permissions for country?

## OPS

Expand Down Expand Up @@ -108,8 +111,10 @@ console make:command
fin console doctrine:database:drop --env=test --force
fin console doctrine:database:create --env=test --if-not-exists -n
fin console doctrine:schema:create --env=test -n
fin console netbrothers:version --env=test --drop-version
fin console netbrothers:version --env=test
fin console hautelook:fixtures:load --env=test -n
phpunit
fin exec phpunit
```

## Providers
Expand Down
87 changes: 48 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,54 @@
"license": "proprietary",
"minimum-stability": "stable",
"prefer-stable": true,
"repositories": [
{
"type": "git",
"url": "https://github.com/attiks/version-bundle"
}
],
"require": {
"php": ">=8.1",
"php": ">=8.2",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/core": "^3.0",
"doctrine/annotations": "^1.0",
"api-platform/core": "^3.2",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.13",
"doctrine/orm": "^2",
"nelmio/cors-bundle": "^2.2",
"netbrothers-gmbh/version-bundle": "dev-short-index-names",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.11",
"scienta/doctrine-json-functions": "^5.2",
"symfony/amazon-mailer": "6.1.*",
"symfony/amazon-mailer": "^6",
"symfony/apache-pack": "^1.0",
"symfony/asset": "6.1.*",
"symfony/console": "6.1.*",
"symfony/doctrine-messenger": "6.1.*",
"symfony/dotenv": "6.1.*",
"symfony/expression-language": "6.1.*",
"symfony/asset": "^6",
"symfony/console": "^6",
"symfony/doctrine-messenger": "^6",
"symfony/dotenv": "^6",
"symfony/expression-language": "^6",
"symfony/flex": "^2",
"symfony/form": "6.1.*",
"symfony/framework-bundle": "6.1.*",
"symfony/http-client": "6.1.*",
"symfony/intl": "6.1.*",
"symfony/mailer": "6.1.*",
"symfony/mime": "6.1.*",
"symfony/monolog-bundle": "^3.0",
"symfony/notifier": "6.1.*",
"symfony/process": "6.1.*",
"symfony/property-access": "6.1.*",
"symfony/property-info": "6.1.*",
"symfony/proxy-manager-bridge": "6.1.*",
"symfony/runtime": "6.1.*",
"symfony/security-bundle": "6.1.*",
"symfony/serializer": "6.1.*",
"symfony/string": "6.1.*",
"symfony/translation": "6.1.*",
"symfony/twig-bundle": "6.1.*",
"symfony/validator": "6.1.*",
"symfony/web-link": "6.1.*",
"symfony/yaml": "6.1.*",
"symfony/form": "^6",
"symfony/framework-bundle": "^6",
"symfony/http-client": "^6",
"symfony/intl": "^6",
"symfony/mailer": "^6",
"symfony/mime": "^6",
"symfony/monolog-bundle": "^3.10",
"symfony/notifier": "^6",
"symfony/process": "^6",
"symfony/property-access": "^6",
"symfony/property-info": "^6",
"symfony/proxy-manager-bridge": "^6",
"symfony/runtime": "^6",
"symfony/security-bundle": "^6",
"symfony/serializer": "^6",
"symfony/string": "^6",
"symfony/translation": "^6",
"symfony/twig-bundle": "^6",
"symfony/validator": "^6",
"symfony/web-link": "^6",
"symfony/yaml": "^6",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
Expand All @@ -60,7 +66,10 @@
"preferred-install": {
"*": "dist"
},
"sort-packages": true
"sort-packages": true,
"audit": {
"abandoned": "report"
}
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -104,7 +113,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "6.1.*"
"require": "^6"
}
},
"require-dev": {
Expand All @@ -113,13 +122,13 @@
"marcocesarato/php-conventional-changelog": "^1.16",
"phpunit/php-code-coverage": "^9.2",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "6.1.*",
"symfony/css-selector": "6.1.*",
"symfony/debug-bundle": "6.1.*",
"symfony/browser-kit": "^6",
"symfony/css-selector": "^6",
"symfony/debug-bundle": "^6",
"symfony/maker-bundle": "^1.47",
"symfony/phpunit-bridge": "^6.1",
"symfony/stopwatch": "6.1.*",
"symfony/web-profiler-bundle": "6.1.*"
"symfony/phpunit-bridge": "^6",
"symfony/stopwatch": "^6",
"symfony/web-profiler-bundle": "^6"
},
"version": "1.0.1"
}
Loading

0 comments on commit 2ea4858

Please sign in to comment.