diff --git a/.all-contributorsrc b/.all-contributorsrc index d9dae5b1c7f..41c806935fa 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -996,6 +996,15 @@ "contributions": [ "code" ] + }, + { + "login": "marpants", + "name": "marpants", + "avatar_url": "https://avatars.githubusercontent.com/u/61366665?v=4", + "profile": "https://github.com/marpants", + "contributions": [ + "code" + ] } ], "skipCi": true diff --git a/.github/ISSUE_TEMPLATE/01_bug-report.yaml b/.github/ISSUE_TEMPLATE/01_bug-report.yaml index 33d4f6b4ee7..9ae8311b58b 100644 --- a/.github/ISSUE_TEMPLATE/01_bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/01_bug-report.yaml @@ -73,29 +73,18 @@ body: - designs/walburga - designs/waralee - designs/yuri - - plugins/plugin-banner - - plugins/plugin-bartack - plugins/plugin-bundle - plugins/plugin-bust - - plugins/plugin-buttons - - plugins/plugin-cutlist - - plugins/plugin-cutonfold - - plugins/plugin-dimension - plugins/plugin-flip - plugins/plugin-gore - - plugins/plugin-grainline - plugins/plugin-i18n - - plugins/plugin-logo - plugins/plugin-measurements - plugins/plugin-mirror - - plugins/plugin-notches - plugins/plugin-round - - plugins/plugin-scalebox - plugins/plugin-sprinkle - plugins/plugin-svgattr - plugins/plugin-theme - plugins/plugin-timing - - plugins/plugin-title - plugins/plugin-versionfree-svg - packages/core - packages/i18n diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml index dd71031b19d..451186fef79 100644 --- a/.github/boring-cyborg.yml +++ b/.github/boring-cyborg.yml @@ -9,29 +9,19 @@ labelPRBasedOnFilePath: ":package: rehype-highlight-lines": [ packages/rehype-highlight-lines/* ] ":package: rehype-jargon": [ packages/rehype-jargon/* ] ":package: snapseries": [ packages/snapseries/* ] - ":electric_plug: plugin-banner": [ plugins/plugin-banner/* ] - ":electric_plug: plugin-bartack": [ plugins/plugin-bartack/* ] + ":electric_plug: plugin-annotations": [ plugins/plugin-annotations/* ] ":electric_plug: plugin-bundle": [ plugins/plugin-bundle/* ] ":electric_plug: plugin-bust": [ plugins/plugin-bust/* ] - ":electric_plug: plugin-buttons": [ plugins/plugin-buttons/* ] - ":electric_plug: plugin-cutlist": [ plugins/plugin-cutlist/* ] - ":electric_plug: plugin-cutonfold": [ plugins/plugin-cutonfold/* ] - ":electric_plug: plugin-dimension": [ plugins/plugin-dimension/* ] ":electric_plug: plugin-flip": [ plugins/plugin-flip/* ] ":electric_plug: plugin-gore": [ plugins/plugin-gore/* ] - ":electric_plug: plugin-grainline": [ plugins/plugin-grainline/* ] ":electric_plug: plugin-i18n": [ plugins/plugin-i18n/* ] - ":electric_plug: plugin-logo": [ plugins/plugin-logo/* ] ":electric_plug: plugin-measurements": [ plugins/plugin-measurements/* ] ":electric_plug: plugin-mirror": [ plugins/plugin-mirror/* ] - ":electric_plug: plugin-notches": [ plugins/plugin-notches/* ] ":electric_plug: plugin-round": [ plugins/plugin-round/* ] - ":electric_plug: plugin-scalebox": [ plugins/plugin-scalebox/* ] ":electric_plug: plugin-sprinkle": [ plugins/plugin-sprinkle/* ] ":electric_plug: plugin-svgattr": [ plugins/plugin-svgattr/* ] ":electric_plug: plugin-theme": [ plugins/plugin-theme/* ] ":electric_plug: plugin-timing": [ plugins/plugin-timing/* ] - ":electric_plug: plugin-title": [ plugins/plugin-title/* ] ":electric_plug: plugin-versionfree-svg": [ plugins/plugin-versionfree-svg/* ] ":book: documentation": [ markdown/* ] ":scroll: scripts": [ scripts/* ] diff --git a/.github/workflows/lint.all.yml b/.github/workflows/lint.all.yml index 5420405c8ef..e062003a7bd 100644 --- a/.github/workflows/lint.all.yml +++ b/.github/workflows/lint.all.yml @@ -24,11 +24,17 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Cache node modules + uses: actions/cache@v3 + id: cache_node_modules + with: + # caching node_modules + path: node_modules + key: node_modules-${{ hashFiles('yarn.lock') }} - name: Install dependencies + if: steps.cache_node_modules.outputs.cache-hit != 'true' run: npx lerna bootstrap env: CI: true - - name: Prebuild Packages - run: npx lerna run prebuild - name: Run eslint run: npm run lint diff --git a/.github/workflows/lint.diff.yml b/.github/workflows/lint.diff.yml index 9ac4e06dcbb..f25b170ad01 100644 --- a/.github/workflows/lint.diff.yml +++ b/.github/workflows/lint.diff.yml @@ -30,7 +30,15 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Cache node modules + uses: actions/cache@v3 + id: cache_node_modules + with: + # caching node_modules + path: node_modules + key: node_modules-${{ hashFiles('yarn.lock') }} - name: Install dependencies + if: steps.cache_node_modules.outputs.cache-hit != 'true' run: npx lerna bootstrap env: CI: true diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 00000000000..1c666a85a70 --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,31 @@ +name: Playwright Tests +on: + push: + branches: + - develop + pull_request: + branches: + - develop +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Cache node modules + uses: actions/cache@v3 + id: cache_node_modules + with: + # caching node_modules + path: node_modules + key: node_modules-${{ hashFiles('yarn.lock') }} + - name: Install dependencies + if: steps.cache_node_modules.outputs.cache-hit != 'true' + run: npx lerna bootstrap + - name: Install Playwright Browsers + run: yarn playwright install --with-deps + - name: Run Playwright tests + run: yarn e2e diff --git a/.github/workflows/tests.all.yml b/.github/workflows/tests.all.yml index e2021b976b1..74b19faf3b1 100644 --- a/.github/workflows/tests.all.yml +++ b/.github/workflows/tests.all.yml @@ -32,13 +32,18 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' + - name: Cache node modules + uses: actions/cache@v3 + id: cache_node_modules + with: + # caching node_modules + path: node_modules + key: node_modules-${{ hashFiles('yarn.lock') }} - name: Install dependencies + if: steps.cache_node_modules.outputs.cache-hit != 'true' run: npx lerna bootstrap env: CI: true - - name: Build all - run: npm run buildall - name: Run all tests run: npm run testall - name: Upload to codecov.io diff --git a/.github/workflows/tests.new-design.yml b/.github/workflows/tests.new-design.yml new file mode 100644 index 00000000000..afe7b7641eb --- /dev/null +++ b/.github/workflows/tests.new-design.yml @@ -0,0 +1,81 @@ +name: Test new-design +on: + push: + branches: + - develop + pull_request: + branches: + - develop +jobs: + shared_setup: + runs-on: ubuntu-latest + outputs: + files: ${{ steps.diff.outputs.files }} + steps: + - name: Fetch PR base ref + uses: actions/checkout@v3 + with: + ref: ${{ github.base_ref }} + - name: Checkout PR ref + uses: actions/checkout@v3 + with: + ref: ${{ github.ref }} + - name: Diff for relevant files + id: diff + run: echo "files=$(git diff --shortstat origin/${{github.base_ref}} sites/shared sites/lab/components packages/new-design packages/core plugins)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-node@v3 + if: steps.diff.outputs.files + with: + node-version: 18 + - name: Cache node modules + uses: actions/cache@v3 + if: steps.diff.outputs.files + id: cache_node_modules + with: + # caching node_modules + path: '**/node_modules' + key: node_modules-${{ hashFiles('yarn.lock') }} + lookup-only: true + - name: Install dependencies + if: steps.diff.outputs.files && steps.cache_node_modules.outputs.cache-hit != 'true' + run: npx lerna bootstrap + env: + CI: true + + test: + if: needs.shared_setup.outputs.files + needs: shared_setup + timeout-minutes: 60 + runs-on: ubuntu-latest + strategy: + matrix: + template: + - scratch + - tutorial + - bent + steps: + - name: Checkout PR ref + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Cache node modules + uses: actions/cache/restore@v3 + id: cache_node_modules + with: + # caching node_modules + path: '**/node_modules' + key: node_modules-${{ hashFiles('yarn.lock') }} + - name: Prebuild i18n + run: yarn i18n-only + working-directory: ./packages/new-design + - name: Generate Design + run: | + cd ../ + TEMPLATE=${{ matrix.template }} NAME=test${{ matrix.template }} node ${{ github.workspace }}/packages/new-design/scripts/generate-from-cli.mjs + - name: Install Playwright Browsers + run: yarn playwright install --with-deps + working-directory: ../test${{ matrix.template }} + - name: Run Playwright tests + run: yarn playwright test + working-directory: ../test${{ matrix.template }} diff --git a/.gitignore b/.gitignore index e003a2658dd..aeeb510df61 100644 --- a/.gitignore +++ b/.gitignore @@ -137,3 +137,6 @@ scripts/verdaccio.sh !markdown/dev/reference/api/point/dist .test-failures.log + +# e2e test results +sites/*/playwright-report diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 3b6dc7a7bc1..b3d5ab3b254 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -131,19 +131,20 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
{draft.store.logs.error.join('\n')}-
{draft.setStores[0].logs.error.join('\n')}+
{patternProps.logs.pattern.error.join('\n')}+
{patternProps.logs.sets[0].error.join('\n')}
+
+
+
diff --git a/sites/shared/package.json b/sites/shared/package.json
index e2130dc2cb4..6e3671448d7 100644
--- a/sites/shared/package.json
+++ b/sites/shared/package.json
@@ -1,6 +1,6 @@
{
"name": "@freesewing/shared",
- "version": "3.0.0-alpha.8",
+ "version": "3.0.0-alpha.9",
"description": "Shared code and React components for different websites",
"author": "Joost De Cock