Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 36 additions & 11 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ on:
- main
- 7.**.x
paths:
- 'tests/e2e/**'
- '.github/workflows/pr-check.yml'
- "tests/e2e/**"
- ".github/workflows/pr-check.yml"
env:
LOCAL_TEST_DIR: /tmp

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
Expand All @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/pageobjects/git-providers/OauthPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down