diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index f4ea819bded..f199f3c4299 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -22,8 +22,8 @@ on: - main - 7.**.x paths: - - 'tests/e2e/**' - - '.github/workflows/pr-check.yml' + - "tests/e2e/**" + - ".github/workflows/pr-check.yml" env: LOCAL_TEST_DIR: /tmp @@ -31,8 +31,8 @@ jobs: pr-check: runs-on: ubuntu-22.04 defaults: - run: - working-directory: tests/e2e + run: + working-directory: tests/e2e steps: - name: Git checkout uses: actions/checkout@v2 @@ -48,17 +48,42 @@ jobs: - name: Configuring nodejs 18.x version uses: actions/setup-node@v3 with: - node-version: '18' + node-version: "18" - - name: Check compilation errors + - name: Check prettier rules run: | npm ci + echo "Running prettier check..." + # Get list of files with formatting issues (use list-different for just file names) + npx prettier --list-different . > /tmp/prettier-files.txt 2>/dev/null || true + + # Display warnings for files with formatting issues + if [ -s /tmp/prettier-files.txt ]; then + echo "::warning::Prettier formatting issues found in the following files:" + + # Display each file with [warn] prefix + while read -r file; do + echo "::warning::[warn] $file" + done < /tmp/prettier-files.txt + echo "Run 'cd tests/e2e && npm run prettier' to fix formatting issues." + + # Fail the build + echo "::error::Prettier check failed! Please fix the formatting issues." + rm -f /tmp/prettier-files.txt + exit 1 + else + echo "No prettier formatting issues found." + fi + + - name: Check compilation errors + run: | npm run tsc - name: Check lint errors run: | npm run lint + - name: Start minikube id: run-minikube uses: che-incubator/setup-minikube-action@next @@ -116,9 +141,9 @@ jobs: - name: Build E2E test docker image run: | - # for saving disk space we can remove the assembly folder because it is legacy code - rm -rf assembly - docker build -t quay.io/eclipse/che-e2e:"${{ env.pr_number }}" -f build/dockerfiles/Dockerfile . + # for saving disk space we can remove the assembly folder because it is legacy code + rm -rf assembly + docker build -t quay.io/eclipse/che-e2e:"${{ env.pr_number }}" -f build/dockerfiles/Dockerfile . - name: Clean up to save disk space run: | @@ -134,13 +159,13 @@ jobs: sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel sudo apt-get autoremove -y sudo apt-get autoclean - + # Remove large directories sudo rm -rf /usr/local/lib/android sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf /opt/hostedtoolcache/CodeQL - + # we have already ran API test, built test image and do not need e2e test-code ls -la ${GITHUB_WORKSPACE} rm -rf ${GITHUB_WORKSPACE}/che diff --git a/tests/e2e/pageobjects/git-providers/OauthPage.ts b/tests/e2e/pageobjects/git-providers/OauthPage.ts index c8d6664d96f..03d5fa512f6 100644 --- a/tests/e2e/pageobjects/git-providers/OauthPage.ts +++ b/tests/e2e/pageobjects/git-providers/OauthPage.ts @@ -50,7 +50,7 @@ export class OauthPage { OauthPage.DENY_ACCESS_BUTTON = By.xpath('//span[text()="Deny"]'); } break; - case GitProviderType.BITBUCKET_CLOUD_OAUTH2: + case GitProviderType.BITBUCKET_CLOUD_OAUTH2: { OauthPage.LOGIN_FORM = By.css('[data-testid="username"]'); OauthPage.PASSWORD_FORM = By.id('password');