diff --git a/.gitea/workflows/kotlin-test.yml b/.gitea/workflows/kotlin-test.yml new file mode 100644 index 0000000..04a736e --- /dev/null +++ b/.gitea/workflows/kotlin-test.yml @@ -0,0 +1,29 @@ +name: Kotlin Test +on: [push] + +jobs: + kotlin-hello: + runs-on: [ubuntu-latest] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Kotlin if missing + run: | + if ! command -v kotlinc >/dev/null; then + sudo apt-get update + sudo apt-get install -y kotlin + fi + + - name: Verify Kotlin installation + run: kotlinc -version + + - name: Compile & run Hello, Kotlin! + run: | + cat > Hello.kt << 'EOF' + fun main() { + println("Hello, Kotlin!") + } + EOF + kotlinc Hello.kt -include-runtime -d Hello.jar + java -jar Hello.jar \ No newline at end of file