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
29 lines
687 B
YAML
29 lines
687 B
YAML
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 |