Add .gitea/workflows/kotlin-test.yml
Some checks failed
CI Demo / build (push) Successful in 4s
Docker Test / docker-ops (push) Successful in 5s
Java Test / java-hello (push) Has been cancelled
Kotlin Test / kotlin-hello (push) Has been cancelled
Python Test / python-hello (push) Has been cancelled
Swift Test / swift-hello (push) Has been cancelled
Some checks failed
CI Demo / build (push) Successful in 4s
Docker Test / docker-ops (push) Successful in 5s
Java Test / java-hello (push) Has been cancelled
Kotlin Test / kotlin-hello (push) Has been cancelled
Python Test / python-hello (push) Has been cancelled
Swift Test / swift-hello (push) Has been cancelled
This commit is contained in:
29
.gitea/workflows/kotlin-test.yml
Normal file
29
.gitea/workflows/kotlin-test.yml
Normal file
@@ -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
|
Reference in New Issue
Block a user