split out sync from java sync #30
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' | |
| 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@v5 | |
| - 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: Cache Bazel repository cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/bazel | |
| ~/.cache/bazelisk | |
| key: ${{ runner.os }}-bazel | |
| - name: Setup Bazelisk | |
| uses: bazelbuild/setup-bazelisk@v3 | |
| - name: Setup Node version | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| - name: 📦 Install dependencies | |
| run: npm ci | |
| - name: 🏗 Build project | |
| 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 tests | |
| uses: GabrielBB/xvfb-action@v1.7 | |
| env: | |
| PRINT_JDTLS_LOGS: true | |
| with: | |
| run: npm run test | |
| options: "-screen 0 1600x1200x24" | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-${{ matrix.os }} | |
| path: | | |
| test/**/*.xml | |
| test/**/*.json | |
| !test/**/tsconfig.json | |
| !test/**/runConfigurations/*.xml | |
| !test/projects/**/* | |
| - name: Upload screenshots on failure | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: screenshots-${{ matrix.os }} | |
| path: | | |
| test/screenshots | |
| test/logs | |
| event_file: | |
| name: "Event File" | |
| runs-on: ubuntu-latest | |
| # needed for publishing test results from forks | |
| steps: | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ci-event-file | |
| path: ${{ github.event_path }} |