pre-Release 7.4.0 #667
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-Release | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: | |
- '*.x' | |
push: | |
branches: | |
- 'feature/7.x/cypress-12' | |
jobs: | |
build: | |
if: github.event.pull_request.draft == false | |
name: TEST BUILD | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.build_json.outputs.BUILD_VERSION }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Checkout RedactorX | |
uses: actions/checkout@v4 | |
with: | |
repository: ExpressionEngine/RedactorX | |
token: ${{ secrets.ORG_ACCESS_TOKEN }} | |
path: __redactorx | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: dom, curl, sqlite, libxml, mbstring, zip, pcntl, pdo, mysql, bcmath, soap, intl, gd, exif, iconv, imagick | |
coverage: none | |
ini-values: error_log=/home/runner/php_errors.log, memory_limit=128M | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '10' | |
- name: Install build tool dependencies | |
working-directory: build-tools | |
run: npm install | |
- name: Rebuild CSS and JS | |
run: | | |
npm install | |
npm run build:css --production | |
npm run build:js | |
npm run build:old-js | |
- name: Get version | |
id: build_json | |
working-directory: build-tools | |
run: | | |
content=`node -pe 'JSON.parse(process.argv[1]).tag' "$(cat build.json)"` | |
echo "BUILD_VERSION=$content" >> $GITHUB_OUTPUT | |
- name: Run build process | |
working-directory: build-tools | |
env: | |
RELEASE_PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }} | |
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }} | |
APP_REPO_PATH: ${{ github.workspace }} | |
REDACTORX_REPO_PATH: ${{ github.workspace }}/__redactorx | |
run: | | |
gulp app --local --nogit --head --skip-lint --jira-collector --skip-pro --version=${{ steps.build_json.outputs.BUILD_VERSION }} | |
- name: Archive Build files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: EE${{ steps.build_json.outputs.BUILD_VERSION }} | |
path: build-tools/builds | |
- name: Set DP version | |
run: echo "dp_ver=1" >> $GITHUB_ENV | |
- name: Get previous DP tag | |
id: prev_tag | |
continue-on-error: true | |
uses: oprypin/find-latest-tag@v1 | |
with: | |
repository: ExpressionEngine/ExpressionEngine | |
prefix: ${{ steps.build_json.outputs.BUILD_VERSION }}-dp. | |
- name: Increase DP version | |
if: ${{ steps.prev_tag.outcome == 'success' }} | |
run: | | |
content=`echo "${{ steps.prev_tag.outputs.tag }}" | rev | cut -d "." -s -f 1 | rev` | |
echo "dp_ver=$(( 1+$content ))" >> $GITHUB_ENV | |
- name: Get previous release tag | |
id: prev_release_tag | |
continue-on-error: true | |
uses: oprypin/find-latest-tag@v1 | |
with: | |
repository: ExpressionEngine/ExpressionEngine | |
regex: '^7\.\d+\.\d+$' | |
releases-only: true | |
- name: Build Changelog | |
id: build_changelog | |
uses: mikepenz/release-changelog-builder-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.ORG_ACCESS_TOKEN }} | |
with: | |
fromTag: ${{ steps.prev_release_tag.outputs.tag }} | |
toTag: ${{ github.event.pull_request.head.sha }} | |
configuration: build-tools/changelog.config.json | |
- uses: ncipollo/release-action@v1.12.0 | |
with: | |
artifacts: "build-tools/builds/ExpressionEngine*,build-tools/builds/signature*" | |
name: ExpressionEngine ${{ steps.build_json.outputs.BUILD_VERSION }} DP ${{ env.dp_ver }} | |
tag: ${{ steps.build_json.outputs.BUILD_VERSION }}-dp.${{ env.dp_ver }} | |
commit: ${{ github.event.pull_request.head.sha }} | |
allowUpdates: true | |
token: ${{ secrets.ORG_ACCESS_TOKEN }} | |
prerelease: true | |
#draft: true | |
body: ${{ steps.build_changelog.outputs.changelog }} | |
- name: Directory Listing on Failure | |
if: failure() | |
run: | | |
ls -latr | |
ls -latr build-tools | |
ls -latr build-tools/builds | |
test-one-click: | |
if: github.event.pull_request.draft == false | |
needs: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [8.0] | |
os: [ubuntu-latest] | |
name: One-click updater, PHP${{ matrix.php }} - ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
repository: ExpressionEngine/ExpressionEngine | |
path: __repo | |
- name: Download EE 7.0 | |
run: | | |
wget -q https://github.com/ExpressionEngine/ExpressionEngine/releases/download/7.0.0/ExpressionEngine7.0.0.zip | |
unzip -q ExpressionEngine7.0.0.zip | |
mv ./__repo/tests ./ | |
mv ./__repo/build-tools ./ | |
sudo apt-get install -yq rpl | |
rpl -v https://update.expressionengine.com ${{ secrets.STAGING_UPDATE_URL }} system/ee/ExpressionEngine/Service/Updater/Runner.php | |
rpl -v https://update.expressionengine.com ${{ secrets.STAGING_UPDATE_URL }} system/ee/legacy/libraries/El_pings.php | |
- name: List the files | |
run: | | |
ls -lar ./ | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, sqlite, libxml, mbstring, zip, pcntl, pdo, mysql, bcmath, soap, intl, gd, exif, iconv, imagick | |
coverage: none | |
ini-values: error_log=/home/runner/php_errors.log, memory_limit=128M | |
- name: Copy config.php | |
run: | | |
rm -f system/user/config/config.php | |
cp -f tests/cypress/support/config/config.php system/user/config/config.php | |
rpl -v '${{ needs.build.outputs.version }}' '7.0.0' build-tools/build.json | |
- name: Remove installer | |
run: | | |
ls -lar system/ee | |
mv system/ee/installer system/ee/_installer | |
- name: Setup Permissions | |
run: | | |
sudo chmod 666 system/user/config/config.php | |
sudo chmod 777 system/user/config | |
sudo chmod -R 777 system/user/cache | |
sudo chmod -R 777 system/user/templates | |
sudo chmod -R 777 system/user/language | |
sudo chmod -R 777 tests/cypress/support/tmp | |
sudo chmod -R 777 tests/cypress/support/file-sync/uploads | |
sudo chmod -R 777 images | |
sudo chmod -R 777 themes/user | |
sudo chmod -R 777 tests/cypress/cypress/screenshots | |
- name: Configure MySQL | |
run: | | |
sudo systemctl start mysql | |
mysql -u root -proot -e 'CREATE DATABASE `ee-test`;' | |
mysql -u root -proot -e 'SET GLOBAL sql_mode="ONLY_FULL_GROUP_BY,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION";' | |
- name: Install Testing PHP dependencies | |
working-directory: tests/cypress | |
run: composer install | |
- name: Start PHP Server | |
run: php -S localhost:8888 & | |
- name: Run 1-click Updater Tests | |
uses: cypress-io/github-action@v6 | |
with: | |
browser: chrome | |
working-directory: tests/cypress | |
config: specPattern=cypress/integration/updater/**.ee6.js | |
record: true | |
group: PHP${{ matrix.php }} | |
env: | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Archive screenshots | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-tests-updater | |
path: tests/cypress/cypress/screenshots/ | |
- name: Archive server errors | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: updater.error.log | |
path: /home/runner/php_errors.log |