Remove the Dart embedded in HTML extensions and tests #88
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: presubmit | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Job 1: Build Plugin | |
| build-plugin: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 # Use the latest stable version of actions/checkout | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 # https://github.com/marketplace/actions/setup-java-jdk | |
| with: | |
| distribution: 'temurin' # Recommended distribution | |
| java-version: '21' # Match version in build.gradle.kts | |
| cache: 'gradle' # Cache Gradle dependencies | |
| - name: Build Plugin Action | |
| run: ./gradlew buildPlugin | |
| working-directory: third_party | |
| # Job 2: Unit Tests | |
| unit-tests: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest ] | |
| runs-on: ${{ matrix.os }} # Use the OS from the matrix | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 # Use the latest stable version of actions/checkout | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 # https://github.com/marketplace/actions/setup-java-jdk | |
| with: | |
| distribution: 'temurin' # Recommended distribution | |
| java-version: '21' # Match version in build.gradle.kts | |
| cache: 'gradle' # Cache Gradle dependencies | |
| - name: Unit Test Action | |
| run: ./gradlew :test --tests "com.jetbrains.lang.dart.*" | |
| working-directory: third_party | |
| # Job 3: Dart Analysis Server Tests | |
| dart-analysis-server-tests: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| # https://github.com/dart-lang/setup-dart | |
| # Define the Dart SDK versions to test against. | |
| # 'stable' and 'beta' will fetch the latest respective versions. | |
| # You can also specify exact versions like '3.0.0', '3.8.1'. | |
| # dart-version: ['3.0.0', 'stable', 'beta', 'dev' ] | |
| dart-version: ['stable'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'gradle' | |
| - name: Set up Dart SDK ${{ matrix.dart-version }} | |
| # This action installs the specified Dart SDK version. | |
| # It sets the DART_SDK environment variable to the SDK root. | |
| uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: ${{ matrix.dart-version }} | |
| - name: Run Dart Analysis Server Tests with Dart SDK ${{ matrix.dart-version }} | |
| if: always() # Run even if one SDK version fails | |
| # Pass the Dart SDK path with DART_HOME | |
| run: | | |
| ${DART_HOME}/bin/dart --version | |
| ./gradlew :test --tests "com.jetbrains.dart.analysisServer.*" | |
| working-directory: third_party | |
| # Job 4: Verify Plugin | |
| verify-plugin: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| runs-on: ${{ matrix.os }} # Use the OS from the matrix | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 # Use the latest stable version of actions/checkout | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 # https://github.com/marketplace/actions/setup-java-jdk | |
| with: | |
| distribution: 'temurin' # Recommended distribution | |
| java-version: '21' # Match version in build.gradle.kts | |
| cache: 'gradle' # Cache Gradle dependencies | |
| - name: Verify Plugin Actions | |
| run: | | |
| ./gradlew verifyPlugin | |
| ./gradlew verifyPluginProjectConfiguration | |
| ./gradlew verifyPluginSignature | |
| ./gradlew verifyPluginStructure | |
| working-directory: third_party |