GitHub Actions: separated workflows for docs and code_samples

This commit is contained in:
Jakub Chrzanowski 2021-01-20 13:02:51 +01:00
parent 12b4006cfa
commit e8c662f31a
4 changed files with 56 additions and 42 deletions

View File

@ -1,43 +1,12 @@
name: Build
on: [push, pull_request]
name: Code Samples
on:
push:
paths: ['code_samples/**']
pull_request:
paths: ['code_samples/**']
jobs:
documentedProblemsPageVerification:
name: Documented Problems Page Verification
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v2
- name: Get Plugin Verifier Version
id: get-version
run: |
echo "::set-output name=version::$(curl -Ss https://api.bintray.com/packages/jetbrains/intellij-plugin-service/intellij-plugin-verifier/versions/_latest | jq -r '.name')"
shell: bash
- name: Setup Cache
id: cache
uses: actions/cache@v2
with:
path: ~/.verifier
key: ${{ runner.os }}-verifier-${{ steps.get-version.outputs.version }}
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Download Plugin Verifier
if: steps.cache.outputs.cache-hit != 'true'
env:
VERSION: ${{ steps.get-version.outputs.version }}
run: |
mkdir -p ~/.verifier/
curl -L --output ~/.verifier/verifier-all.jar https://dl.bintray.com/jetbrains/intellij-plugin-service/org/jetbrains/intellij/plugins/verifier-cli/$VERSION/verifier-cli-$VERSION-all.jar
- name: Run Plugin Verifier
run: |
PR_REPOSITORY=$(jq -re ".pull_request.head.repo.full_name // empty" $GITHUB_EVENT_PATH) || true
REPOSITORY=${PR_REPOSITORY:-$GITHUB_REPOSITORY}
REF=${GITHUB_HEAD_REF:-$GITHUB_REF}
java -cp ~/.verifier/verifier-all.jar com.jetbrains.pluginverifier.filtering.documented.DocumentedProblemsPageVerifierMain $REPOSITORY ${REF##*/}
gradleValidation:
name: Gradle Wrappers
runs-on: ubuntu-latest

43
.github/workflows/docs.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: Docs
on:
push:
paths-ignore: ['code_samples/**']
pull_request:
paths-ignore: ['code_samples/**']
jobs:
documentedProblemsPageVerification:
name: Documented Problems Page Verification
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v2
- name: Get Plugin Verifier Version
id: get-version
run: |
echo "::set-output name=version::$(curl -Ss https://api.bintray.com/packages/jetbrains/intellij-plugin-service/intellij-plugin-verifier/versions/_latest | jq -r '.name')"
shell: bash
- name: Setup Cache
id: cache
uses: actions/cache@v2
with:
path: ~/.verifier
key: ${{ runner.os }}-verifier-${{ steps.get-version.outputs.version }}
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Download Plugin Verifier
if: steps.cache.outputs.cache-hit != 'true'
env:
VERSION: ${{ steps.get-version.outputs.version }}
run: |
mkdir -p ~/.verifier/
curl -L --output ~/.verifier/verifier-all.jar https://dl.bintray.com/jetbrains/intellij-plugin-service/org/jetbrains/intellij/plugins/verifier-cli/$VERSION/verifier-cli-$VERSION-all.jar
- name: Run Plugin Verifier
run: |
PR_REPOSITORY=$(jq -re ".pull_request.head.repo.full_name // empty" $GITHUB_EVENT_PATH) || true
REPOSITORY=${PR_REPOSITORY:-$GITHUB_REPOSITORY}
REF=${GITHUB_HEAD_REF:-$GITHUB_REF}
java -cp ~/.verifier/verifier-all.jar com.jetbrains.pluginverifier.filtering.documented.DocumentedProblemsPageVerifierMain $REPOSITORY ${REF##*/}

View File

@ -2,7 +2,8 @@
[![official JetBrains project](https://jb.gg/badges/official.svg)][jb:confluence-on-gh]
[![Twitter Follow](https://img.shields.io/twitter/follow/JBPlatform?style=flat)][jb:twitter]
[![Build](https://github.com/JetBrains/intellij-sdk-docs/workflows/Build/badge.svg)][gh:build]
[![Build](https://github.com/JetBrains/intellij-sdk-docs/workflows/Docs/badge.svg)][gh:workflow-docs]
[![Build](https://github.com/JetBrains/intellij-sdk-docs/workflows/Code%20Samples/badge.svg)][gh:workflow-code-samples]
[![Slack](https://img.shields.io/badge/Slack-%23intellij--platform-blue)][jb:slack]
Welcome to the repository for [IntelliJ Platform SDK Documentation](https://plugins.jetbrains.com/docs/intellij/?from=GH-README) site.
@ -15,7 +16,8 @@ Please report any content inconsistencies, outdated materials, cosmetic issues,
## Contributing
Please follow the steps outlined in [Contributing](https://plugins.jetbrains.com/docs/intellij/intellij-sdk-docs-original-contributing.html).
[gh:build]: https://github.com/JetBrains/intellij-sdk-docs/actions?query=workflow%3ABuild
[gh:workflow-docs]: https://github.com/JetBrains/intellij-sdk-docs/actions?query=workflow%3ADocs
[gh:workflow-code-samples]: https://github.com/JetBrains/intellij-sdk-docs/actions?query=workflow%3ACode%20Samples
[jb:confluence-on-gh]: https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub
[jb:slack]: https://plugins.jetbrains.com/slack

View File

@ -3,7 +3,7 @@
[![official JetBrains project](https://jb.gg/badges/official.svg)][jb:confluence-on-gh]
[![JetBrains IntelliJ Platform SDK Docs](https://jb.gg/badges/docs.svg)][jb:docs]
[![Twitter Follow](https://img.shields.io/twitter/follow/JBPlatform?style=flat)][jb:twitter]
[![Build](https://github.com/JetBrains/intellij-sdk-docs/workflows/Build/badge.svg)][gh:build]
[![Build](https://github.com/JetBrains/intellij-sdk-docs/workflows/Code%20Samples/badge.svg)][gh:workflow-code-samples]
[![Slack](https://img.shields.io/badge/Slack-%23intellij--platform-blue)][jb:slack]
Learn how to build plugins using IntelliJ Platform SDK for the [JetBrains products][jb:products] by experimenting with our code samples.
@ -54,7 +54,7 @@ In the following table, you may find all available samples provided in the separ
| [Tool Window](./tool_window) | Custom Tool Window example plugin. |
| [Tree Structure Provider](./tree_structure_provider) | Tree Structure Provider showing only plain text files. |
[gh:build]: https://github.com/JetBrains/intellij-sdk-docs/actions?query=workflow%3ABuild
[gh:workflow-code-samples]: https://github.com/JetBrains/intellij-sdk-docs/actions?query=workflow%3ACode%20Samples
[gh:template]: https://github.com/JetBrains/intellij-platform-plugin-template
[jb:confluence-on-gh]: https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub