Skip to content

Commit

Permalink
Merge pull request #70 from lilt/4.x-development
Browse files Browse the repository at this point in the history
Release 4.2.0
  • Loading branch information
hadomskyi authored Aug 20, 2023
2 parents 40c9dbc + bafaac1 commit fe00734
Show file tree
Hide file tree
Showing 159 changed files with 21,576 additions and 1,190 deletions.
44 changes: 41 additions & 3 deletions .github/workflows/craft-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Tests on multiple craft versions
on:
push:
branches:
- 1.x #CraftCMS v3 | PHP 7.2
- 2.x #CraftCMS v4 | PHP 8.0.2
- 4.x #CraftCMS v4
pull_request:
branches:
- "*"
Expand Down Expand Up @@ -47,14 +46,53 @@ jobs:
"4.2.6",
"4.2.7",
"4.2.8",
"4.3.0",
"4.3.1",
"4.3.2",
"4.3.2.1",
"4.3.3",
"4.3.4",
"4.3.5",
"4.3.6",
"4.3.6.1",
"4.3.7",
"4.3.7.1",
"4.3.8",
"4.3.8.1",
"4.3.8.2",
"4.3.9",
"4.3.10",
"4.3.11",
"4.4.0",
"4.4.1",
"4.4.2",
"4.4.3",
"4.4.4",
"4.4.5",
"4.4.6",
"4.4.6.1",
"4.4.7",
"4.4.7.1",
"4.4.8",
"4.4.9",
"4.4.10",
"4.4.10.1",
"4.4.11",
"4.4.12",
"4.4.13",
"4.4.14",
"4.4.15",
"4.4.16",
"4.4.16.1",
"4.4.17",
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set the value
id: step_one
run: |
echo "PHP_VERSION=8.0" >> $GITHUB_ENV
echo "PHP_VERSION=8.1" >> $GITHUB_ENV
echo "CRAFT_VERSION=${{ matrix.craft_version }}" >> $GITHUB_ENV
- name: Test craft versions ${{ matrix.craft_version }}
run: make test-craft-versions
71 changes: 71 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: E2E Tests
on:
push:
branches:
- 4.x #CraftCMS v4
pull_request:
branches:
- "*"
jobs:
tests:
strategy:
matrix:
os: [ ubuntu-latest ]
scenario: [
"cypress/e2e/jobs/copy-source-text-flow/filters.cy.js",
"cypress/e2e/jobs/copy-source-text-flow/success-path-multiple.cy.js",
"cypress/e2e/jobs/copy-source-text-flow/success-path-single.cy.js",
"cypress/e2e/jobs/instant/success-path-multiple.cy.js",
"cypress/e2e/jobs/instant/success-path-multiple-copy-slug.cy.js",
"cypress/e2e/jobs/instant/success-path-multiple-copy-slug-and-enable-after-publish.cy.js",
"cypress/e2e/jobs/instant/success-path-multiple-enable-after-publish.cy.js",
"cypress/e2e/jobs/verified/success-path-multiple-bulk-publishing.cy.js",
"cypress/e2e/jobs/verified/success-path-multiple-bulk-publishing-copy-slug.cy.js",
"cypress/e2e/jobs/verified/success-path-multiple-bulk-publishing-copy-slug-and-enable-after-publish.cy.js",
"cypress/e2e/jobs/verified/success-path-multiple-bulk-publishing-enable-after-publish.cy.js",
"cypress/e2e/jobs/verified/success-path-multiple-single-publishing.cy.js",
"cypress/e2e/jobs/verified/success-path-multiple-single-publishing-copy-slug.cy.js",
"cypress/e2e/jobs/verified/success-path-multiple-single-publishing-copy-slug-and-enable-after-publish.cy.js",
"cypress/e2e/jobs/verified/success-path-multiple-single-publishing-enable-after-publish.cy.js",
"cypress/e2e/jobs/verified/success-path-single.cy.js",
"cypress/e2e/jobs/instant/success-path-single.cy.js",
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set the value
id: step_one
run: |
echo "CYPRESS_SCENARIO=${{ matrix.scenario }}" >> $GITHUB_ENV
echo "DB_DATABASE=$(uuidgen)" >> $GITHUB_ENV
- name: Run automation
working-directory: ./e2e
run: |
echo ${DB_DATABASE}
make up
make e2e-github
- name: Copy artifacts
if: ${{ failure() }}
working-directory: ./e2e
run: |
make backup-db
mkdir var
mkdir var/log
mkdir cypress/craft
mkdir cypress/craft/storage
mkdir cypress/craft/config
docker compose cp app:/app/storage cypress/craft/storage
docker compose cp app:/app/config cypress/craft/config
docker compose cp app:/app/composer.json cypress/craft
docker compose cp app:/app/composer.lock cypress/craft
docker compose cp app:/var/log var/log
- name: Use the Upload Artifact GitHub Action
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: "${{ github.job }}_${{ github.run_id }}_${{ github.workflow }}_e2e_artifacts"
path: |
./e2e/cypress/craft
./e2e/cypress/screenshots
./e2e/cypress/videos
./e2e/happy-lager-main/storage
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Tests
on:
push:
branches:
- 4.x #CraftCMS v4 | PHP 8.0.2
- 4.x #CraftCMS v4
pull_request:
branches:
- "*"
Expand Down
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,49 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 4.2.0 - 2023-08-09
### Added
- Introduced new job and translation status "needs attention"
- Added warning message for translation jobs exceeding field limit with
- Included warning icon for each translation exceeding field limit with
- Download Diagnostic Data button for error reporting
- Notification if the plugin is outdated
- New queue job for manually syncing Lilt jobs
- Entry slug name added to translation filenames
- Priority for jobs from queue
- Background job for translation downloading
- Increase TTR for background jobs
- Option to enable target entries on translations publish
- Option to enable slug copy from source entries to target

### Changed
- Updated error message for failed jobs after retries
- Retry logic for queues
- Queues priority decreased for sending jobs to 1024 and receiving to 2048
- Deprecate FetchInstantJobTranslationsFromConnector and FetchVerifiedJobTranslationsFromConnector

### Fixed
- Merge canonical changes from the Neo field into drafts
- Added fallback for block elements without a created structure to fix content provider
- Resolved duplication issue with Neo and SuperTable fields
- Query for fetching translations by status and id
- Duplication of Neo fields content
- Fixed an issue with drafts being overridden due to an incorrect canonical merge
- Fixed a problem where translations were not updating to a failed status when a job fails
- Multilingual draft publishing issue
- Failed jobs aren't able to be deleted ([github issue](https://github.com/lilt/craft-lilt-plugin/issues/90))
- Copy source text for Matrix fields
- Configuration page issues
- Get versions for Jobs element
- Skip sync for new jobs
- Enabling of entries on translation publish
- Entry version content provider
- Updating of translation connector ids

### Fixed
- Multiple drafts apply issue for different sites
- Draft apply issue (all fields in translation draft now marked as changed for new drafts)

## 4.1.0 - 2022-10-11
### Added
- Retry logic for failed jobs
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

export

PHP_VERSION?=8.0
MYSQL_VERSION?=5.7
PHP_VERSION?=8.1
MYSQL_VERSION?=8.0

up:
docker-compose up -d
Expand Down Expand Up @@ -34,7 +34,7 @@ composer-install:
quality:
docker-compose exec -T -u www-data cli-app sh -c "curl -L -s https://phar.phpunit.de/phpcpd.phar --output phpcpd.phar"
docker-compose exec -T -u www-data cli-app sh -c "php vendor/bin/phpcs"
docker-compose exec -T -u www-data cli-app sh -c "php phpcpd.phar src"
docker-compose exec -T -u www-data cli-app sh -c "php phpcpd.phar src --exclude /craft-lilt-plugin/src/migrations"

quality-fix:
docker-compose exec -T -u www-data cli-app sh -c "php vendor/bin/phpcbf"
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lilt/craft-lilt-plugin",
"description": "The Lilt plugin makes it easy for you to send content to Lilt for translation right from within Craft CMS.",
"type": "craft-plugin",
"version": "4.1.0",
"version": "4.2.0",
"keywords": [
"craft",
"cms",
Expand All @@ -22,7 +22,6 @@
}
],
"require": {
"php": "^8.0.2",
"craftcms/cms": "^4.0.0",
"lilt/lilt-connector-sdk-php": "0.1.0",
"ext-json": "*",
Expand All @@ -37,7 +36,7 @@
"craftcms/redactor": "^2.0 || ^3.0",
"percipioglobal/craft-colour-swatches": "^1.0 || ^4.0",
"spicyweb/craft-neo": "3.1.5",
"verbb/super-table": "^2.0 || 3.0.0-beta.6",
"verbb/super-table": "^3.0",
"wiremock-php/wiremock-php": "^2.33"
},
"autoload": {
Expand Down
1 change: 1 addition & 0 deletions craft-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ versions=("$@")

for i in "${versions[@]}"; do
composer require craftcms/cms:"$i" -W
composer require yiisoft/yii2:"2.0.47" -W
composer dump-autoload
php vendor/bin/codecept build

Expand Down
7 changes: 7 additions & 0 deletions e2e/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CYPRESS_APP_URL=
CYPRESS_API_URL=
CYPRESS_API_KEY=
CYPRESS_MOCKSERVER_HOST=
CYPRESS_MOCKSERVER_PORT=
CYPRESS_USER_NAME=
CYPRESS_USER_PASSWORD=
8 changes: 8 additions & 0 deletions e2e/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CYPRESS_APP_URL=http://app:8080
CYPRESS_API_URL=http://mockserver:1080
CYPRESS_API_KEY=this_is_apy_key
CYPRESS_MOCKSERVER_HOST=mockserver
CYPRESS_MOCKSERVER_PORT=1080
CYPRESS_MOCKSERVER_ENABLED=true
CYPRESS_USER_NAME=admin
CYPRESS_USER_PASSWORD=password
7 changes: 7 additions & 0 deletions e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
cypress/videos
.idea
*.env.json
happy-lager-main/
!happy-lager-override/composer.lock
*.override.yml
Loading

0 comments on commit fe00734

Please sign in to comment.