diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4c642e6e..58783802 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -6,11 +6,6 @@ on: pull_request: branches: [ "open","main" ] -env: - BUILDER_DOCKER_NAME: "af2-web-runtime-builder" - BUILDER_DOCKER_NAME_14: "af2-web-runtime-builder_14" - DOCKERCOMMAND: "docker run -u `id -u` --rm -v `pwd`:/app $BUILDER_DOCKER_NAME sh -c " - DOCKER14COMMAND: "docker run --rm -v `pwd`:/app $BUILDER_DOCKER_NAME_14 sh -c " jobs: buildProject: runs-on: ubuntu-latest @@ -26,6 +21,10 @@ jobs: uses: actions/setup-node@v3.3.0 with: node-version: ${{ matrix.node }} + - name: setup python + uses: actions/setup-python@v4 + with: + python-version: '3.x' - uses: actions/setup-java@v3 with: distribution: 'zulu' # See 'Supported distributions' for available options @@ -43,15 +42,13 @@ jobs: - name: test-with-node-14 run: | echo ${{matrix.node}} - npm config set unsafe-perm true - npm -v - npm ci --ignore-scripts - npx lerna bootstrap --ci --strict -# npm ci --ignore-scripts -# npx lerna run build -# npx lerna run test -# npx lerna run clean -# rm -rf node_modules packages/*/node_modules + npm config set unsafe-perm true + npm ci --ignore-scripts + npx lerna bootstrap --ci --strict + npx lerna run build + npx lerna run test + npx lerna run clean + rm -rf node_modules packages/*/node_modules if: ${{matrix.node==14}} - name: build-package-with-latest-node run: | @@ -64,10 +61,15 @@ jobs: npx lerna run test:ci if: ${{matrix.node=='latest'}} - name: diff-coverage - if: github.event_name == 'pull_request' + if: ${{github.event_name == 'pull_request' && matrix.node=='latest'}} run: | - ls - diff-cover --html-report packages/forms-next-core/target/coverage/diff-cover.html --compare-branch ${{github.event.pull_request.base.ref}} packages/forms-next-core/target/coverage/cobertura-coverage.xml --fail-under=90 - + pip install diff-cover + git fetch --no-tags --depth=500 origin main + git fetch --no-tags --depth=500 origin open + diff-cover --html-report packages/aem-forms-af-core/target/coverage/diff-cover.html --compare-branch origin/${{github.event.pull_request.base.ref}} packages/aem-forms-af-core/target/coverage/cobertura-coverage.xml --fail-under=90 + diff-cover --html-report packages/aem-forms-af-react-components/target/coverage/diff-cover.html --compare-branch origin/${{github.event.pull_request.base.ref}} packages/aem-forms-af-react-components/target/coverage/cobertura-coverage.xml --fail-under=90 + +# diff-cover --html-report packages/forms-next-core/target/coverage/diff-cover.html --compare-branch ${{github.event.pull_request.base.ref}} packages/forms-next-core/target/coverage/cobertura-coverage.xml --fail-under=90 + diff --git a/packages/aem-forms-af-core/package.json b/packages/aem-forms-af-core/package.json index 1a96052f..07d27cbd 100644 --- a/packages/aem-forms-af-core/package.json +++ b/packages/aem-forms-af-core/package.json @@ -27,7 +27,7 @@ "test": "jest --silent", "eslint": "npx eslint src/**", "eslint:fix": "npx eslint --fix src/**", - "test-ci": "jest --silent --coverage", + "test:ci": "jest --silent --coverage", "build": "npm run eslint && npx tsc", "build-libs": "npx tsc", "clean": "rm -rf lib coverage", @@ -35,7 +35,7 @@ "docs": "npx typedoc --options .typedoc.cjs" }, "dependencies": { - "@adobe/json-formula": "git+https://github.com/adobe/json-formula.git#e246367c091948140db6f581806114ee482dcd1a" + "@adobe/json-formula": "git+https://git@github.com/adobe/json-formula.git#e246367c091948140db6f581806114ee482dcd1a" }, "devDependencies": { "@types/jest": "26.0.24", diff --git a/packages/aem-forms-af-core/src/Checkbox.ts b/packages/aem-forms-af-core/src/Checkbox.ts index e0f008e2..22bc6576 100644 --- a/packages/aem-forms-af-core/src/Checkbox.ts +++ b/packages/aem-forms-af-core/src/Checkbox.ts @@ -58,4 +58,4 @@ class Checkbox extends Field { } } -export default Checkbox; \ No newline at end of file +export default Checkbox; diff --git a/packages/aem-forms-af-react-components/package.json b/packages/aem-forms-af-react-components/package.json index 390e8d52..e8ecc909 100644 --- a/packages/aem-forms-af-react-components/package.json +++ b/packages/aem-forms-af-react-components/package.json @@ -25,7 +25,7 @@ "eslint": "npx eslint src/**/*.ts*", "build": "npm run eslint && npx tsc && cp src/styles.css lib", "build-libs": "npx tsc && cp src/styles.css lib", - "test-ci": "jest --silent --coverage", + "test:ci": "jest --silent --coverage", "prepublishOnly": "npm run build && npm run test", "test": "jest --silent", "storybook": "start-storybook -p 6006", diff --git a/packages/forms-headless-sample/package.json b/packages/forms-headless-sample/package.json index 1db4b52a..788a4cca 100644 --- a/packages/forms-headless-sample/package.json +++ b/packages/forms-headless-sample/package.json @@ -31,8 +31,8 @@ "babel-loader": "8.1.0", "jest": "26.6.0", "ts-jest": "26.5.6", - "typescript": "^4.3.5", - "webpack": "^5.5.0" + "typescript": "^4.3.5" + }, "scripts": { "start": "react-scripts start", diff --git a/packages/performance-testing/package.json b/packages/performance-testing/package.json index 169f6a74..49dace15 100644 --- a/packages/performance-testing/package.json +++ b/packages/performance-testing/package.json @@ -26,8 +26,8 @@ }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", + "build": "CI=false && react-scripts build", + "test": "react-scripts test --passWithNoTests", "eject": "react-scripts eject" }, "eslintConfig": {