-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from moderntribe/2.0/chore/combine-bugfixes
[2.0]: Chore - combine bugfixes
- Loading branch information
Showing
3 changed files
with
33 additions
and
123 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,113 +167,11 @@ jobs: | |
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
e2e-tests: | ||
name: End-to-End Testing (via Playwright) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
needs: build | ||
env: | ||
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/wme-sitebuilder/tests/results/allure-report | ||
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/wme-sitebuilder/tests/results/allure-results | ||
DEFAULT_TIMEOUT_OVERRIDE: 30000 | ||
steps: | ||
- name: Check Out Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Setup Node.js Environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Setup PHP, with Composer and Extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
tools: composer:v2 | ||
php-version: '8.0' | ||
|
||
- name: Setup Problem Matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
|
||
- name: Prepare Node Modules Cache | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
|
||
- name: Prepare Composer Dependencies Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{needs.build.outputs.composer-files-dir}} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
# Install playwright's binary under custom directory to cache | ||
- name: Set Playwright path (non-windows) | ||
if: runner.os != 'Windows' | ||
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV | ||
- name: Set Playwright path (windows) | ||
if: runner.os == 'Windows' | ||
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV | ||
|
||
- name: Cache Playwright's binary | ||
uses: actions/cache@v3 | ||
with: | ||
# Playwright removes unused browsers automatically | ||
# So does not need to add playwright version to key | ||
key: ${{ runner.os }}-playwright-bin-v1 | ||
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }} | ||
|
||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Install Playwright Dependencies | ||
run: | | ||
npx playwright install chromium --with-deps | ||
- name: Launch wp-env End-to-End Environment | ||
working-directory: plugins/wme-sitebuilder | ||
run: pnpm env:dev | ||
|
||
- name: Run Sitebuilder End-to-End tests | ||
timeout-minutes: 15 | ||
working-directory: plugins/wme-sitebuilder | ||
run: pnpm test | ||
|
||
- name: Generate Playwright E2E Test Report | ||
if: success() || failure() | ||
working-directory: plugins/wme-sitebuilder | ||
run: pnpm exec allure generate --clean ${{ env.ALLURE_RESULTS_DIR }} --output ${{ env.ALLURE_REPORT_DIR }} | ||
|
||
- name: Archive E2E Test Report | ||
if: success() || failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.E2E_ARTIFACT }} | ||
path: | | ||
${{ env.ALLURE_RESULTS_DIR }} | ||
${{ env.ALLURE_REPORT_DIR }} | ||
if-no-files-found: ignore | ||
retention-days: 5 | ||
|
||
deploy: | ||
if: ${{ github.ref_name == 'main' || github.ref_name == '1.0-branch' || github.ref_name == '2.0-branch' }} | ||
name: Deploy to Test Sites | ||
needs: [build, lint, e2e-tests] | ||
needs: [build, lint] | ||
uses: ./.github/workflows/deploy.yml | ||
secrets: | ||
ssh-key: ${{ secrets.SITEBUILDER_SSH_PRIVATE_KEY }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
- '*' | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.SPLIT_ACCESS_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} | ||
|
||
jobs: | ||
packages_split: | ||
|
@@ -41,8 +41,8 @@ jobs: | |
repository_name: '${{ matrix.package.split_repository }}' | ||
|
||
# ↓ the user signed under the split commit | ||
user_name: "bswatson" | ||
user_email: "bwatson@liquidweb.com" | ||
user_name: "Tr1b0t" | ||
user_email: "[email protected].com" | ||
|
||
# with tag | ||
- | ||
|
@@ -59,5 +59,5 @@ jobs: | |
repository_name: '${{ matrix.package.split_repository }}' | ||
|
||
# ↓ the user signed under the split commit | ||
user_name: "bswatson" | ||
user_email: "bwatson@liquidweb.com" | ||
user_name: "Tr1b0t" | ||
user_email: "[email protected].com" |
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