-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
111 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags-ignore: | ||
- '*' | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
test_no_changes: | ||
runs-on: ubuntu-latest | ||
name: Test (no formatting changes) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run action | ||
id: test-action | ||
uses: findologic/intellij-format-action@main | ||
with: | ||
include-glob: '*.kt' | ||
path: test/no_formatting_necessary | ||
fail-on-changes: false | ||
|
||
- name: Assert no files changed | ||
run: '[[ ${{ steps.test-action.outputs.files-changed }} == 0 ]]' | ||
|
||
test_with_changes: | ||
runs-on: ubuntu-latest | ||
name: Test (with formatting changes) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run action | ||
id: test-action | ||
uses: findologic/intellij-format-action@main | ||
with: | ||
include-glob: '*.kt' | ||
path: test/formatting_necessary | ||
fail-on-changes: false | ||
|
||
- name: Assert file change detected | ||
run: '[[ ${{ steps.test-action.outputs.files-changed }} -gt 0 ]]' | ||
|
||
test_without_changes_different_pattern: | ||
runs-on: ubuntu-latest | ||
name: Test (no changes due to pattern mismatch) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run action | ||
id: test-action | ||
uses: findologic/intellij-format-action@main | ||
with: | ||
include-glob: '*.java' | ||
path: test/formatting_necessary | ||
fail-on-changes: false | ||
|
||
- name: Assert no files changed | ||
run: '[[ ${{ steps.test-action.outputs.files-changed }} == 0 ]]' | ||
|
||
test_fail_on_changes: | ||
runs-on: ubuntu-latest | ||
name: Test (fail on changes enabled) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run action | ||
id: test-action | ||
uses: findologic/intellij-format-action@main | ||
with: | ||
include-glob: '*.kt' | ||
path: test/formatting_necessary | ||
fail-on-changes: true | ||
continue-on-error: true | ||
|
||
- name: Assert file change detected | ||
run: '[[ ${{ steps.test-action.outputs.files-changed }} -gt 0 ]]' | ||
|
||
- name: Assert action failed | ||
run: '[[ ${{ steps.test-action.outcome }} == "failure" ]]' | ||
|
||
- name: Assert conclusion is success, because continue-on-error | ||
run: '[[ ${{ steps.test-action.conclusion }} == "success" ]]' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
FROM openjdk:16-alpine | ||
FROM ubuntu:latest | ||
MAINTAINER FINDOLOGIC Developers <[email protected]> | ||
|
||
RUN wget -O /tmp/idea.tar.gz https://download.jetbrains.com/idea/ideaIC-2021.1.2.tar.gz \ | ||
RUN apt-get update \ | ||
&& apt-get install -y bash git wget \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& wget --no-verbose -O /tmp/idea.tar.gz https://download.jetbrains.com/idea/ideaIC-2021.1.2.tar.gz \ | ||
&& cd /opt \ | ||
&& tar xzf /tmp/idea.tar.gz \ | ||
&& mv /opt/idea* /opt/idea \ | ||
&& rm /tmp/idea.tar.gz \ | ||
&& apk add --no-cache bash git | ||
&& rm /tmp/idea.tar.gz | ||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fun main(args: Array<String>) { | ||
println("this has not been indented") | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fun main(args: Array<String>) { | ||
println("this is indented properly") | ||
} |