Skip to content

Commit

Permalink
Utils connection pipeline start
Browse files Browse the repository at this point in the history
  • Loading branch information
pospisilf committed Jan 26, 2024
1 parent 7600bb1 commit 82a68e9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
42 changes: 41 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Main CI

on:
push:
branches: [ main ]
branches: [ main, utils ]
pull_request:
branches: [ main ]
workflow_dispatch:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/ui-test/uitest_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function main(): Promise<void> {
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,
Expand Down

0 comments on commit 82a68e9

Please sign in to comment.