diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 76a65820b..3ecfd8292 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -2,7 +2,7 @@ name: Main CI on: push: - branches: [ main ] + branches: [ main, utils ] pull_request: branches: [ main ] workflow_dispatch: @@ -26,12 +26,52 @@ jobs: TEST_RESOURCES: test-resources runs-on: ${{ matrix.os }} + steps: - name: Checkout Repository uses: actions/checkout@v4 with: fetch-depth: 0 + # The question is what I am interested in: + # Fork owner ${{github.repository_owner}} or PR author ${{github.event.pull_request.user.login}}? + # Branch name directly ${{github.ref_name}} or base/head in PR ${{github.event.pull_request.base.ref}}? + + - name: Check for UTILS branch in Fork + run: | + USER_FORK="https://github.com/${{github.repository_owner}}/vscode-uitests-tooling.git" + BRANCH_NAME="${{github.ref_name}}" + BRANCH_EXISTS_NO=$(curl -s -o /dev/null -w '%{http_code}' "$USER_FORK/branches/$BRANCH_NAME" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}") + BRANCH_EXISTS_YES=$(curl -s -o /dev/null -w '%{http_code}' "$USER_FORK/branches/main" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}") + echo $USER_FORK + echo $BRANCH_NAME + echo $BRANCH_EXISTS_NO + echo $BRANCH_EXISTS_YES + # - name: Check for UTILS branch in Fork + # id: check-branch + # run: | + # echo "neco" + # USER_FORK="https://github.com/${{ github.event.pull_request.user.login }}/utils.git" + # BRANCH_NAME="${{ github.event.pull_request.head.ref }}" + # BRANCH_EXISTS=$(curl -s -o /dev/null -w '%{http_code}' "$USER_FORK/branches/$BRANCH_NAME" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}") + # if [ $BRANCH_EXISTS -eq 200 ]; then + # echo "UTILS_FORK_BRANCH_EXISTS=true" >> $GITHUB_ENV + # echo "USER_FORK=$USER_FORK" >> $GITHUB_ENV + # else + # echo "UTILS_FORK_BRANCH_EXISTS=false" >> $GITHUB_ENV + + # - name: Early exit + # run: | + # gh run cancel ${{ github.run_id }} + # gh run watch ${{ github.run_id }} + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: kill pipeline + run: | + KILLER = "${{github.event.pull_request.user.login}}? + echo $KILLER + - name: Set up JDK 17 uses: actions/setup-java@v4 with: diff --git a/src/ui-test/uitest_runner.ts b/src/ui-test/uitest_runner.ts index 11317c8d7..55c16eca7 100644 --- a/src/ui-test/uitest_runner.ts +++ b/src/ui-test/uitest_runner.ts @@ -32,7 +32,7 @@ async function main(): Promise { await tester.setupAndRunTests( [ 'out/src/ui-test/tests/env/set.camel.version.js', - 'out/src/ui-test/tests/*.test.js', + 'out/src/ui-test/tests/01_lsp.extension.test.js', 'out/src/ui-test/tests/env/check.camel.version.js' ], process.env.CODE_VERSION,