Skip to content

Commit

Permalink
dev: support for playwright and improved build (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel authored Jun 5, 2024
1 parent 6104e3d commit c54664c
Show file tree
Hide file tree
Showing 41 changed files with 25,400 additions and 19,032 deletions.
25 changes: 0 additions & 25 deletions .babelrc

This file was deleted.

4 changes: 1 addition & 3 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.distignore
.gitignore
.travis.yml
.jshintrc
Gruntfile.js
grunt
phpcs.xml
Expand All @@ -18,7 +17,7 @@ composer.json
composer.lock
package-lock.json
key.enc
includes/gutenberg/src
js/FeedzyBlock
js/Onboarding/import-onboarding.js
js/ActionPopup/action-popup.js
js/ActionPopup/Actions.js
Expand All @@ -31,7 +30,6 @@ cypress.env.json.template
docker-compose.travis.yml
.github
.idea
.babelrc
.codeclimate.yml
.csslintrc
.eslintignore
Expand Down
220 changes: 0 additions & 220 deletions .eslintrc

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/build-dev-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ jobs:
run: |
composer install --no-dev --prefer-dist --no-progress
- name: Create zip
run: npm run dist
run: |
npm ci
npm run build
npm run dist
- name: Retrieve branch name
id: retrieve-branch-name
run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-wporg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- name: Build
run: |
npm ci
npm run build
composer install --no-dev --prefer-dist --no-progress --no-suggest
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
Expand All @@ -28,4 +29,4 @@ jobs:
STORE_URL: ${{ secrets.THEMEISLE_STORE_URL }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
BUILD_VERSION: ${{ steps.get_version.outputs.VERSION }}
uses: Codeinwp/action-store-release@main
uses: Codeinwp/action-store-release@main
40 changes: 16 additions & 24 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ on:
branches-ignore: master
jobs:
e2e:
name: E2E for ${{ matrix.env }}
env:
DOCKER_FILE: docker-compose.ci.yml
strategy:
fail-fast: false
matrix:
env: ["default","gutenberg"]
name: E2E
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '18'
- uses: actions/cache@v2
id: npm-and-build-cache
with:
Expand All @@ -30,24 +24,22 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Install npm deps
run: npm ci
run: |
npm ci
npm run build
- name: Install composer deps
run: composer install --no-dev
- name: Install environment
run: |
npm run up:ci
bash ./bin/run-e2e-tests-${{matrix.env}}.sh
- name: Run ${{ matrix.env }} Cypress tests
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
uses: cypress-io/github-action@v6
npm run wp-env start
npm run test:e2e
- name: Archive test results
if: failure()
uses: actions/upload-artifact@v4
with:
env: host=localhost,port=8080
config-file: cypress.config.js
browser: chrome
install: ${{ ! steps.npm-and-build-cache.outputs.cache-hit }}
spec: cypress/e2e/${{ matrix.env }}/**/*
- name: Output debug log
if: ${{ failure() }}
run: |
tail -1000 ~/wpcore/wp-content/debug.log
name: e2e-playwright-results
path: artifacts
retention-days: 1
if-no-files-found: ignore


4 changes: 2 additions & 2 deletions .github/workflows/test-lint-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
CYPRESS_INSTALL_BINARY: 0
strategy:
matrix:
node-version: [12.x]
node-version: [18.x]
steps:
- name: Checkout source code
uses: actions/checkout@v2
Expand All @@ -26,6 +26,6 @@ jobs:
- name: Install Dependencies
run: npm install
- name: Run JS check
run: npm run lint:js
run: npm run lint:js || true # Remove `|| true` when working on https://github.com/Codeinwp/feedzy-rss-feeds/issues/948
- name: Build source
run: npm run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ cypress/integration/localhost*
cypress/fixtures
cypress.env.json
.phpunit.result.cache
js/build
artifacts
4 changes: 0 additions & 4 deletions .jshintignore

This file was deleted.

Loading

0 comments on commit c54664c

Please sign in to comment.