mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
* 251: update GH links in topics * code_samples: Gradle 2.x (WIP) * code_samples: Gradle 2.x (WIP) * code_samples: Gradle 2.x (WIP) * code_samples: Gradle 2.x (WIP) * code_samples: Gradle 2.x (WIP) * code_samples: Gradle 2.x (WIP) * GH: theme_basics is not a Gradle project * GH: remove deleted kotlin_demo project * README: remove deleted kotlin_demo project * code_samples: remove product_specific * 2025.1 Beta3 * code_samples: remove obsolete kotlin_demo dir * code_samples: add .intellijPlatform to .gitignore * stub_indexes.md: fix gh link * api_notable_list_2020.md: fix gh link * code_samples: add .gitignore for standalone repo * code_samples: build against latest 2024.2.x, set since-build explicitly * code_samples: fix framework_basics * Update EP and Listener lists * Convert %gh-ic-master% links to %gh-ic% * additional_minor_features.md: Update link to FileIncludeProvider * api_notable_list_2020.md: Add note about internal API * status_bar_widgets.md: Update StatusBarWidget.TextPresentation example The previous example doesn't implement TextPresentation any more. --------- Co-authored-by: Karol Lewandowski <karol.lewandowski@jetbrains.com>
100 lines
3.0 KiB
YAML
100 lines
3.0 KiB
YAML
name: Code Samples
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths: [ 'code_samples/**','.github/workflows/code-samples.yml' ]
|
|
pull_request:
|
|
paths: [ 'code_samples/**','.github/workflows/code-samples.yml' ]
|
|
|
|
jobs:
|
|
|
|
checkout:
|
|
name: Checkout
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Fetch Sources
|
|
uses: actions/checkout@v4
|
|
|
|
samples:
|
|
name: Code Samples / ${{ matrix.plugin }}
|
|
needs: checkout
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
plugin:
|
|
- action_basics
|
|
- comparing_string_references_inspection
|
|
- conditional_operator_intention
|
|
- editor_basics
|
|
- facet_basics
|
|
- framework_basics
|
|
- live_templates
|
|
- max_opened_projects
|
|
- module
|
|
- project_model
|
|
- project_view_pane
|
|
- project_wizard
|
|
- psi_demo
|
|
- run_configuration
|
|
- settings
|
|
- simple_language_plugin
|
|
- tool_window
|
|
- tree_structure_provider
|
|
steps:
|
|
- name: Fetch Sources
|
|
uses: actions/checkout@v4
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: zulu
|
|
java-version: 17
|
|
|
|
- name: Build Plugin
|
|
run: (cd code_samples/${{ matrix.plugin }}; ./gradlew buildPlugin)
|
|
- name: Test Plugin
|
|
run: (cd code_samples/${{ matrix.plugin }}; ./gradlew test)
|
|
|
|
- name: Export Properties
|
|
id: properties
|
|
shell: bash
|
|
run: |
|
|
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
|
|
|
|
- name: Run Plugin Verifier
|
|
run: |
|
|
echo "
|
|
tasks {
|
|
verifyPlugin {
|
|
freeArgs.set(listOf(\"-mute\", \"TemplateWordInPluginId\"))
|
|
}
|
|
}
|
|
" >> code_samples/${{ matrix.plugin }}/build.gradle.kts
|
|
cd code_samples/${{ matrix.plugin }}
|
|
./gradlew verifyPlugin -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
|
|
|
|
- name: Collect Plugin Verifier Result
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.plugin }}-pluginVerifier-result
|
|
path: ${{ github.workspace }}/code_samples/${{ matrix.plugin }}/build/reports/pluginVerifier
|
|
|
|
mirror:
|
|
name: Code Samples Mirror
|
|
if: github.ref == 'refs/heads/main' && github.repository == 'JetBrains/intellij-sdk-docs'
|
|
needs: samples
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install SSH key
|
|
uses: shimataro/ssh-key-action@v2
|
|
with:
|
|
key: ${{ secrets.SSH_KEY }}
|
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
- name: Prepare Mirror
|
|
run: |
|
|
git clone --bare git@github.com:JetBrains/intellij-sdk-docs.git .
|
|
git branch | grep -v "main" | xargs -r git branch -D
|
|
git filter-branch --prune-empty --subdirectory-filter code_samples main
|
|
git push --mirror git@github.com:JetBrains/intellij-sdk-code-samples.git
|