Fix bug in SynchronizeProjectViewJob #178
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| build-and-test: | |
| name: Build and Test (OS ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] #, windows-latest] # https://github.com/coactions/setup-xvfb/issues/18 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get Time for BUILD_ID | |
| id: time | |
| uses: nanzm/get-time-action@v2.0 | |
| with: | |
| format: "YYYYMMDD_HHmm" | |
| - name: Get Branch name for BUILD_LABEL | |
| id: branch_name | |
| shell: bash | |
| run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
| - name: Free up space on ubuntu-latest | |
| if: success() && matrix.os == 'ubuntu-latest' | |
| shell: bash | |
| run: .github/free_disk_space.sh | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Cache local Maven repository | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.target') }} | |
| restore-keys: | | |
| ${{ runner.os }}-m2 | |
| - name: Cache IntelliJ Aspects | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./bundles/com.salesforce.bazel.sdk/aspects/aspects*.zip | |
| key: ${{ runner.os }}-aspects-${{ hashFiles('**/aspects/import/import-and-build.sh', '**/aspects/import/MODULE.bazel*') }} | |
| - name: Cache Bazel repository cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/bazel | |
| ~/.cache/bazelisk | |
| /var/tmp/_bazel_* | |
| key: ${{ runner.os }}-bazel | |
| - name: Setup Bazelisk | |
| uses: bazelbuild/setup-bazelisk@v3 | |
| - name: Setup Node version | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: 'npm' | |
| cache-dependency-path: 'vscode/package-lock.json' | |
| node-version-file: 'vscode/package.json' | |
| - name: Print Maven toolchains.xml | |
| shell: bash | |
| run: cat ~/.m2/toolchains.xml | |
| - name: Import IntelliJ Aspects | |
| working-directory: ./bundles/com.salesforce.bazel.sdk/aspects/import | |
| shell: bash | |
| run: ./import-and-build.sh | |
| - name: Build and Test Eclipse & JDTLS Plug-ins | |
| uses: coactions/setup-xvfb@v1 | |
| env: | |
| BUILD_ID: "${{ steps.time.outputs.time }}" | |
| BUILD_TYPE: "S" | |
| BUILD_LABEL: "CI ${{ steps.time.outputs.time }} (${{ steps.branch_name.outputs.branch }})" | |
| with: | |
| run: ./mvnw --batch-mode --no-transfer-progress --strict-checksums --fail-at-end -update-snapshots --show-version --errors clean verify | |
| - name: Upload Maven Test Results | |
| uses: actions/upload-artifact@v5 | |
| if: always() | |
| with: | |
| name: test-results-${{ matrix.os }}-maven | |
| path: tests/**/target/surefire-reports/*.xml | |
| - name: Install Node dependencies | |
| working-directory: ./vscode | |
| run: npm ci | |
| - name: Build VS Code Extension | |
| working-directory: ./vscode | |
| env: | |
| BUILD_ID: "${{ steps.time.outputs.time }}" | |
| BUILD_TYPE: "S" | |
| BUILD_LABEL: "CI ${{ steps.time.outputs.time }} (${{ steps.branch_name.outputs.branch }})" | |
| run: npm run build | |
| - name: Run VS Code Extension Tests | |
| uses: GabrielBB/xvfb-action@v1.7 | |
| env: | |
| PRINT_JDTLS_LOGS: true | |
| with: | |
| run: npm run test | |
| working-directory: ./vscode | |
| options: "-screen 0 1600x1200x24" | |
| - name: Upload VS Code Test Results | |
| uses: actions/upload-artifact@v5 | |
| if: always() | |
| with: | |
| name: test-results-${{ matrix.os }}-vscode | |
| path: vscode/test/result/**/*.* | |
| - name: Upload screenshots on failure | |
| uses: actions/upload-artifact@v5 | |
| if: failure() | |
| with: | |
| name: screenshots-${{ matrix.os }} | |
| path: | | |
| vscode/test/screenshots | |
| vscode/test/logs | |
| - name: Prepare packaging of pre-release extension | |
| if: success() && matrix.os == 'ubuntu-latest' | |
| run: node scripts/index.mjs prepare-pre-release | |
| working-directory: ./vscode | |
| - name: Package VS Code Extension | |
| if: success() && matrix.os == 'ubuntu-latest' | |
| run: npm run package | |
| working-directory: ./vscode | |
| - name: Upload p2 Repository | |
| uses: actions/upload-artifact@v5 | |
| if: success() && matrix.os == 'ubuntu-latest' | |
| with: | |
| name: p2-repository | |
| path: releng/p2repository/target/repository/ | |
| if-no-files-found: error | |
| - name: Upload JDTLS Products | |
| uses: actions/upload-artifact@v5 | |
| if: success() && matrix.os == 'skip-product-upload-for-now' | |
| with: | |
| name: jdt-bazel-ls | |
| path: | | |
| releng/products/jdt-bazel-ls/target/products/*.tar.gz | |
| releng/products/jdt-bazel-ls/target/products/*.zip | |
| if-no-files-found: error | |
| - name: Upload SCIPLS Products | |
| uses: actions/upload-artifact@v5 | |
| if: success() && matrix.os == 'skip-product-upload-for-now' | |
| with: | |
| name: scip-bazel-ls | |
| path: | | |
| releng/products/scip-bazel-ls/target/products/*.tar.gz | |
| releng/products/scip-bazel-ls/target/products/*.zip | |
| if-no-files-found: error | |
| - name: Upload Bazel JDT Language Server extension | |
| uses: actions/upload-artifact@v5 | |
| if: success() && matrix.os == 'ubuntu-latest' | |
| with: | |
| name: vscode-server | |
| path: vscode/server/ | |
| if-no-files-found: error | |
| - name: Upload VS Code extension | |
| uses: actions/upload-artifact@v5 | |
| if: success() && matrix.os == 'ubuntu-latest' | |
| with: | |
| name: bazel-eclipse-vscode-extension | |
| path: vscode/bazel-eclipse-vscode-*.vsix | |
| if-no-files-found: error | |
| event_file: | |
| name: "Event File" | |
| runs-on: ubuntu-latest | |
| # needed for publishing test results from forks | |
| steps: | |
| - name: Upload | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ci-event-file | |
| path: ${{ github.event_path }} |