Skip to content

Commit 02072ac

Browse files
committed
Added tests
1 parent cfd691f commit 02072ac

File tree

1,086 files changed

+20085
-19440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,086 files changed

+20085
-19440
lines changed

.github/workflows/test.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build and test
2+
3+
permissions:
4+
checks: write
5+
6+
on:
7+
push:
8+
branches:
9+
- 2025.2
10+
- "feature/*"
11+
- "dev/*"
12+
pull_request:
13+
branches:
14+
- 2025.2
15+
- "feature/*"
16+
- "dev/*"
17+
18+
jobs:
19+
build:
20+
name: Build and Test
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout Repository
24+
uses: actions/checkout@v4
25+
- name: Checkout MCreator repository
26+
uses: actions/checkout@v4
27+
with:
28+
repository: MCreator/MCreator
29+
ref: 2025.2.28610
30+
path: mcreator
31+
- name: Set up JDK 21
32+
uses: actions/setup-java@v4
33+
with:
34+
java-version: '21.0.7+6.0.LTS'
35+
distribution: 'temurin'
36+
- name: Cache Gradle Packages
37+
uses: actions/cache@v4
38+
with:
39+
path: |
40+
~/.gradle/caches
41+
~/.gradle/wrapper
42+
~/.mcreator/gradle/caches/
43+
~/.mcreator/gradle/wrapper/
44+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
45+
restore-keys: |
46+
${{ runner.os }}-gradle-
47+
- name: Grant execute permission for gradlew
48+
run: chmod +x ./gradlew
49+
- name: Run MCreator Test With Plugin
50+
run: xvfb-run -a ./gradlew test --project-prop mcreator_path=${{ github.workspace }}/mcreator
51+
- name: Test Javadoc Generation
52+
run: ./gradlew javadoc
53+
- name: Publish Test Report
54+
uses: mikepenz/action-junit-report@9379f0ccddcab154835d4e2487555ee79614fe95
55+
if: always() # always run even if the previous step fails
56+
with:
57+
include_passed: true
58+
detailed_summary: true
59+
report_paths: '**/build/test-results/test/TEST-*.xml'
60+
- name: Prepare Gradle Cache
61+
run: |
62+
rm -f ~/.mcreator/gradle/caches/modules-2/modules-2.lock
63+
rm -fr ~/.mcreator/gradle/caches/*/plugin-resolution/
64+
rm -f ~/.mcreator/gradle/caches/minecraft/deobfedDeps/providedDummy.jar
65+
rm -f ~/.mcreator/gradle/caches/minecraft/deobfedDeps/compileDummy.jar
66+
rm -f ~/.gradle/caches/modules-2/modules-2.lock
67+
rm -f ~/.gradle/caches/modules-2/gc.properties

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#FILES FOR INTELLIJ IDEA
2+
#=======================
3+
**/.idea/workspace.xml
4+
**/.idea/tasks.xml
5+
**/.idea/uiDesigner.xml
6+
**/.idea/gradle.xml
7+
**/.idea/modules.xml
8+
**/.idea/deployment.xml
9+
**/.idea/discord.xml
10+
**/.idea/shelf
11+
**/.idea/libraries-with-intellij-classes.xml
12+
**/.idea/php.xml
13+
**/.idea/copilot/
14+
15+
#FILES FOR GRADLE
16+
#=======================
17+
.gradle
18+
/build/
19+
**/build/
20+
21+
#SYSTEM AND JAVA FILES
22+
#=====================
23+
Thumbs.db
24+
debug.log
25+
hs_err_pid*
26+
27+
#MACOS
28+
#=====================
29+
.DS_Store
30+
.AppleDouble
31+
.LSOverride
32+
/.idea/runConfigurations.xml

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/Generator-1.19.2.main.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Run_MCreator_tests_with_plugin.xml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Run_MCreator_with_plugin.xml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)