Skip to content

Commit c50f77c

Browse files
committed
revert: restore matrix testing strategy for Node 20 and 22
Reverted CI workflow changes to restore matrix testing across Node 20 and 22 as requested by maintainer. Strapi plugins must support multiple Node versions. Changes: - Restored matrix strategy in lint and test jobs - Removed Cypress retries configuration - Removed scrollIntoView workaround in navigateToInterface command - Removed || true fallbacks from yalc scripts Per maintainer feedback, the matrix testing approach is required for proper multi-version support. Test workarounds have been removed to return to the original testing approach.
1 parent 7a5d337 commit c50f77c

4 files changed

Lines changed: 24 additions & 32 deletions

File tree

.github/workflows/tests.yml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ jobs:
1414
lint:
1515
name: 'lint'
1616
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
node: [20, 22]
1720
steps:
1821
- uses: actions/checkout@v4
1922
- uses: actions/setup-node@v4
2023
with:
21-
node-version-file: '.nvmrc'
24+
node-version: ${{ matrix.node }}
2225
cache: 'yarn'
2326
- name: Install dependencies
2427
run: yarn --frozen-lockfile
@@ -28,36 +31,31 @@ jobs:
2831
name: 'test'
2932
needs: [lint]
3033
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
node: [20, 22]
3137
steps:
3238
- uses: actions/checkout@v4
3339
- uses: actions/setup-node@v4
3440
with:
35-
node-version-file: '.nvmrc'
41+
node-version: ${{ matrix.node }}
3642
cache: 'yarn'
3743
- name: Install dependencies plugin
3844
run: yarn --no-lockfile --unsafe-perm
39-
- name: Build plugin
40-
run: yarn build
41-
- name: Link plugin to playground
45+
- name: Build and pack plugin
4246
run: |
43-
# Try yalc first
44-
yarn playground:yalc-add || true
45-
46-
# Check if yalc succeeded
47-
if [ ! -d "playground/.yalc/strapi-plugin-config-sync" ]; then
48-
echo "Yalc failed, installing from tarball as fallback"
49-
# Create tarball and install it
50-
yarn pack --filename plugin.tgz
51-
cd playground
52-
# Remove yalc link from package.json and install from tarball
53-
npm pkg delete dependencies.strapi-plugin-config-sync
54-
yarn add ../plugin.tgz
55-
else
56-
cd playground
57-
yarn install --unsafe-perm
58-
fi
47+
yarn build
48+
yarn pack --filename plugin.tgz
49+
- name: Install plugin in playground
50+
run: |
51+
cd playground
52+
# Remove yalc link, install from tarball
53+
sed -i 's|"strapi-plugin-config-sync": "link:.yalc/strapi-plugin-config-sync"|"strapi-plugin-config-sync": "file:../plugin.tgz"|' package.json
54+
# Clean install everything
55+
rm -rf node_modules yarn.lock
56+
yarn install --unsafe-perm
5957
- name: Build playground
60-
run: yarn playground:build
58+
run: cd playground && yarn build
6159
# - name: Run unit tests
6260
# run: yarn test:unit
6361
- name: Run integration tests

cypress.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ module.exports = defineConfig({
88
video: true,
99
defaultCommandTimeout: 30000,
1010
requestTimeout: 30000,
11-
retries: {
12-
runMode: 2,
13-
openMode: 0,
14-
},
1511
setupNodeEvents(on, config) {
1612
// implement node event listeners here.
1713
// eslint-disable-next-line global-require

cypress/support/commands.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ Cypress.Commands.add('navigateToInterface', (path) => {
7373
url: '/config-sync/diff',
7474
}).as('getConfigDiff');
7575

76-
// Scroll settings link into view to handle position:fixed overflow issues
77-
cy.get('a[href="/admin/settings"]').scrollIntoView();
7876
cy.get('a[href="/admin/settings"]').should('be.visible').click();
7977
cy.get('a[href="/admin/settings/config-sync"]').should('be.visible').click();
8078

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
"scripts": {
3232
"develop": "strapi-plugin watch:link",
3333
"watch": "pack-up watch",
34-
"build": "pack-up build && (yalc push --publish || true)",
34+
"build": "pack-up build",
3535
"eslint": "eslint --max-warnings=0 './**/*.{js,jsx}'",
3636
"eslint:fix": "eslint --fix './**/*.{js,jsx}'",
3737
"test:unit": "jest --verbose",
3838
"test:integration": "cd playground && node_modules/.bin/jest --verbose --forceExit --detectOpenHandles",
3939
"test:e2e": "cypress open",
40-
"playground:install": "(yarn playground:yalc-add-link || true) && cd playground && yarn install",
41-
"playground:yalc-add": "cd playground && (yalc add strapi-plugin-config-sync || true)",
42-
"playground:yalc-add-link": "cd playground && (yalc add --link strapi-plugin-config-sync || true)",
40+
"playground:install": "yarn playground:yalc-add-link && cd playground && yarn install",
41+
"playground:yalc-add": "cd playground && yalc add strapi-plugin-config-sync",
42+
"playground:yalc-add-link": "cd playground && yalc add --link strapi-plugin-config-sync",
4343
"playground:build": "cd playground && yarn build",
4444
"playground:develop": "cd playground && yarn develop",
4545
"playground:start": "cd playground && yarn start"

0 commit comments

Comments
 (0)