-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor project structure and enhance testing framework #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b0798fc
8648e92
cbba79e
e5ca7af
fc530ec
a7329f7
7cfbb9e
2f5333e
57faad5
ebd5297
6eeaa62
76135ba
0ec9e89
d4b6224
72f5d21
d975383
bd77c55
3b1c310
97e986b
db57118
fbfb684
876b594
8dc49ad
c983ace
20704f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Run tests | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - stable | ||
| - dev | ||
| paths: | ||
| - tests/** | ||
| - scripts/** | ||
| - .github/workflows/test-skripts.yml | ||
| pull_request: | ||
| branches: | ||
| - stable | ||
| - dev | ||
| paths: | ||
| - tests/** | ||
| - scripts/** | ||
| - .github/workflows/test-skripts.yml | ||
|
|
||
| concurrency: | ||
| group: run-tests | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| run-tests: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Pre-create plugin directory | ||
| run: | | ||
| mkdir -p build/libs | ||
| mkdir -p build/libs/skript-reflect | ||
|
|
||
| - name: Download Skript-Reflect | ||
| run: | | ||
| mkdir -p build/libs | ||
| curl -L -o build/libs/skript-reflect.jar \ | ||
| https://github.com/SkriptLang/skript-reflect/releases/download/v2.6.1/skript-reflect-2.6.1.jar | ||
|
|
||
| - name: Download Routines from JitPack | ||
| run: | | ||
| mkdir -p build/libs | ||
|
|
||
| curl -L --fail -o build/libs/skript-reflect/routines-core.jar \ | ||
| https://jitpack.io/com/github/devdinc/routines/routines-core/v2.2.1/routines-core-v2.2.1.jar | ||
|
|
||
| curl -L --fail -o build/libs/skript-reflect/routines-paper.jar \ | ||
| https://jitpack.io/com/github/devdinc/routines/routines-paper/v2.2.1/routines-paper-v2.2.1.jar | ||
| # Disable pdc for now, i want to remove skbee req | ||
| # Disable config reload | ||
| - name: Prepare scripts | ||
| run: | | ||
| mkdir -p tests/scripts | ||
| rsync -av scripts/ tests/scripts/ | ||
| mv tests/scripts/libs/singlelinesection.sk tests/scripts/libs/0_singlelinesection.sk | ||
| rm -f tests/scripts/utils/testframework.sk | ||
| rm -f tests/scripts/libs/pdc.sk | ||
| rm -f tests/scripts/utils/configreloadv2.sk | ||
|
|
||
|
|
||
| - name: Run tests | ||
| uses: devdinc/skript-test-action@v1.3 | ||
| with: | ||
| skript_repo_url: https://github.com/devdinc/Skript.git | ||
| # directory where your test scripts are located (relative to repo root) | ||
| test_script_directory: tests | ||
|
|
||
| # Skript version or ref (tag, branch, or commit) | ||
| skript_repo_ref: copy-dir-resources # 2.13.2 | ||
|
Comment on lines
+76
to
+77
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Branch ref may cause non-reproducible builds. Using branch name |
||
|
|
||
| # directory containing addon/plugin jars (relative to repo root) | ||
| extra_plugins_directory: build/libs | ||
|
|
||
| run_vanilla_tests: false | ||
|
Comment on lines
+69
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Attempt to check the action repository via web (without gh CLI authentication requirement)
# First, check if we can reach GitHub
curl -s -I https://github.com/devdinc/skript-test-action 2>&1 | head -5
echo "---"
# Try to fetch the release info
curl -s https://api.github.com/repos/devdinc/skript-test-action/releases/tags/v1.3 2>&1 | head -20Repository: devdinc/skripts Length of output: 1466 🌐 Web query:
💡 Result: I couldn't find a GitHub repository or published Action named "devdinc/skript-test-action" on GitHub. Please check the repository name or share a link — I can search again or inspect the repo if you provide the URL. 🏁 Script executed: #!/bin/bash
# Check if action.yml exists in the repository
curl -s https://raw.githubusercontent.com/devdinc/skript-test-action/main/action.yml 2>&1 | head -50
echo "---"
# Also try master branch in case
curl -s https://raw.githubusercontent.com/devdinc/skript-test-action/master/action.yml 2>&1 | head -50Repository: devdinc/skripts Length of output: 1954 Remove the undefined The external action |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: devdinc/skripts
Length of output: 1148
🏁 Script executed:
Repository: devdinc/skripts
Length of output: 1148
🏁 Script executed:
Repository: devdinc/skripts
Length of output: 93
🏁 Script executed:
Repository: devdinc/skripts
Length of output: 2467
Reduce permissions scope from
contents: writetocontents: read.The workflow only performs read operations on the repository and does not write any changes back. The test action (
devdinc/skript-test-action@v1.3) runs via Docker and does not declare permission requirements. Local filesystem operations likemkdirandrsyncoperate within the working directory and do not require repository write access. Usecontents: readto follow the principle of least privilege.