mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
80 lines
2.4 KiB
YAML
80 lines
2.4 KiB
YAML
name: Code Samples
|
|
on:
|
|
push:
|
|
paths: [ 'code_samples/**','.github/workflows/code-samples.yml' ]
|
|
pull_request:
|
|
paths: [ 'code_samples/**','.github/workflows/code-samples.yml' ]
|
|
|
|
jobs:
|
|
|
|
gradleValidation:
|
|
name: Gradle Wrappers
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Fetch Sources
|
|
uses: actions/checkout@v2.3.4
|
|
- name: Gradle Wrapper Validation
|
|
uses: gradle/wrapper-validation-action@v1.0.3
|
|
|
|
samples:
|
|
name: Code Samples / ${{ matrix.plugin }}
|
|
needs: gradleValidation
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
plugin:
|
|
- action_basics
|
|
- comparing_references_inspection
|
|
- conditional_operator_intention
|
|
- editor_basics
|
|
- facet_basics
|
|
- framework_basics
|
|
- inspection_basics
|
|
- kotlin_demo
|
|
- live_templates
|
|
- max_opened_projects
|
|
- module
|
|
- product_specific/pycharm_basics
|
|
- project_model
|
|
- project_view_pane
|
|
- project_wizard
|
|
- psi_demo
|
|
- run_configuration
|
|
- simple_language_plugin
|
|
- tool_window
|
|
- tree_structure_provider
|
|
container:
|
|
image: gradle:jdk8
|
|
steps:
|
|
- name: Fetch Sources
|
|
uses: actions/checkout@v2.3.4
|
|
- name: Setup Cache
|
|
uses: actions/cache@v2.1.5
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- name: Verify Plugin
|
|
run: gradle -p code_samples/${{ matrix.plugin }} verifyPlugin
|
|
- name: Test Plugin
|
|
run: gradle -p code_samples/${{ matrix.plugin }} test
|
|
|
|
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
|