Skip to content

Commit

Permalink
#1 adding build action (#14)
Browse files Browse the repository at this point in the history
* #1 adding build action

Co-authored-by: Patrick Schönfeld <patrick.schoenfeld@cec.valantic.com>
  • Loading branch information
pwnyprod and Patrick Schönfeld committed Jul 8, 2022
1 parent fdbeb73 commit abfc897
Show file tree
Hide file tree
Showing 8 changed files with 166 additions and 327 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: 'Main'

# **What it does**: Renders the content of every page and check all internal links.
# **Why we have it**: To make sure all links connect correctly.
# **Who does it impact**: Docs content.

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read
# Needed for the 'trilom/file-changes-action' action
pull-requests: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: set gradle opts
uses: allenevans/set-env@v2.0.0
with:
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
- name: set gradle user home
run: export GRADLE_USER_HOME=`pwd`/.gradle
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: create chain credentials
uses: finnp/create-file-action@1.0.0
env:
FILE_NAME: ".ssl-keys/chain.crt"
FILE_DATA: $CHAIN_CERT
- name: create chain credentials
uses: finnp/create-file-action@1.0.0
env:
FILE_NAME: ".ssl-keys/private.pem"
FILE_DATA: $PRIVATE_PEM
- name: create chain credentials
uses: finnp/create-file-action@1.0.0
env:
FILE_NAME: ".ssl-keys/password.txt"
FILE_DATA: $PASSWORD_TXT
- name: Build with Gradle
run: ./gradlew --build-cache clean buildPlugin
- name: upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: build/distributions
tests:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: install tree
run: sudo apt update && sudo apt install tree -y
- name: set gradle opts
uses: allenevans/set-env@v2.0.0
with:
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
- name: set gradle user home
run: export GRADLE_USER_HOME=`pwd`/.gradle
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: create chain credentials
uses: finnp/create-file-action@1.0.0
env:
FILE_NAME: ".ssl-keys/chain.crt"
FILE_DATA: $CHAIN_CERT
- name: create chain credentials
uses: finnp/create-file-action@1.0.0
env:
FILE_NAME: ".ssl-keys/private.pem"
FILE_DATA: $PRIVATE_PEM
- name: create chain credentials
uses: finnp/create-file-action@1.0.0
env:
FILE_NAME: ".ssl-keys/password.txt"
FILE_DATA: $PASSWORD_TXT
- name: build twig cache
run: ./build_twig_cache.sh
- name: Run tests
run: ./gradlew test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ build
.ssl-keys/chain.crt
.ssl-keys/password.txt
.ssl-keys/private.pem
src/main/resources/template-map.json
20 changes: 14 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ plugins {
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.6.10"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.5.3"
id("org.jetbrains.intellij") version "1.7.0"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "1.3.1"
// Gradle Qodana Plugin
id("org.jetbrains.qodana") version "0.1.13"
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
id("io.gitlab.arturbosch.detekt") version "1.14.2"
// ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle
id("org.jlleitschuh.gradle.ktlint") version "9.4.1"
//id("org.jlleitschuh.gradle.ktlint") version "10.3.0"
// id("com.x5dev.chunk.templates") version "3.5.0"
}

Expand Down Expand Up @@ -50,7 +50,7 @@ intellij {
version.set(properties("platformVersion"))
type.set(properties("platformType"))

//localPath.set("/home/patrickjaja/.local/share/JetBrains/Toolbox/apps/PhpStorm/ch-0/213.6777.58")
// localPath.set("/home/patrickjaja/.local/share/JetBrains/Toolbox/apps/PhpStorm/ch-0/213.6777.58")
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
}
Expand Down Expand Up @@ -113,8 +113,7 @@ tasks {

runIde {
jvmArgs("-Xmx2024m", "-Xms512m", "-XX:MaxPermSize=500m", "-ea")
ideDir.set(file(properties("platformIdeDir")))

//ideDir.set(file(properties("platformIdeDir")))
}

// Configure UI tests plugin
Expand All @@ -141,4 +140,13 @@ tasks {
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()))
}
}

buildPlugin {
doFirst {
exec {
workingDir(".")
executable("./build_twig_cache.sh")
}
}
}
}
3 changes: 3 additions & 0 deletions build_twig_cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cd ./src/main/resources
tree -J templates/ > template-map.json
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pluginGroup = com.github.patrickjaja.intellijsprykerplugin
pluginName = intellij_spryker_plugin
pluginVersion = 1.0.5
pluginVersion = 1.0.6
pluginSinceBuild = 213
pluginUntilBuild = 222.*
# pluginUntilBuild = 221.*
Expand Down
179 changes: 0 additions & 179 deletions src/main/resources/template-map-v2.json

This file was deleted.

Loading

0 comments on commit abfc897

Please sign in to comment.