Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-wiki.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish wiki
on:
push:
branches: [main]
branches: [stable]
paths:
- docs/**
- .github/workflows/publish-wiki.yml
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/test-skripts.yml
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
Comment on lines +26 to +27
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Fetch the action.yml from devdinc/skript-test-action
curl -sL "https://api.github.com/repos/devdinc/skript-test-action/contents/action.yml?ref=v1.3" | jq -r '.content' 2>/dev/null | base64 -d 2>/dev/null | head -50

Repository: devdinc/skripts

Length of output: 1148


🏁 Script executed:

# Also check the repository to see if the action needs write permissions
curl -sL "https://raw.githubusercontent.com/devdinc/skript-test-action/v1.3/action.yml" | head -60

Repository: devdinc/skripts

Length of output: 1148


🏁 Script executed:

# Check the workflow file to see what operations are being performed
git ls-files | grep -E "test-skripts\.yml"

Repository: devdinc/skripts

Length of output: 93


🏁 Script executed:

# Get the full workflow file to examine all steps
cat .github/workflows/test-skripts.yml | head -100

Repository: devdinc/skripts

Length of output: 2467


Reduce permissions scope from contents: write to contents: 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 like mkdir and rsync operate within the working directory and do not require repository write access. Use contents: read to follow the principle of least privilege.


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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Branch ref may cause non-reproducible builds.

Using branch name copy-dir-resources instead of a tagged version (e.g., 2.13.2) means the workflow behavior can change unexpectedly when the branch is updated. Consider pinning to a specific commit SHA or tagged release for reproducibility.


# directory containing addon/plugin jars (relative to repo root)
extra_plugins_directory: build/libs

run_vanilla_tests: false
Comment on lines +69 to +82
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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 -20

Repository: devdinc/skripts

Length of output: 1466


🌐 Web query:

devdinc/skript-test-action GitHub repository action

💡 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 -50

Repository: devdinc/skripts

Length of output: 1954


Remove the undefined skript_repo_url parameter.

The external action devdinc/skript-test-action@v1.3 exists and is properly configured for most parameters. However, skript_repo_url is not an accepted input by this action and will be silently ignored. The action accepts only: test_script_directory, skript_repo_ref, run_vanilla_tests, and extra_plugins_directory. Remove the skript_repo_url line or verify with the action maintainer if this parameter serves a different purpose.

Loading
Loading