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
41 changes: 41 additions & 0 deletions .github/workflows/check-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run Kotlin Check Tests
on:
push:
branches: [ "main", "development" ]
# pull_request:
# branches: [ "main", "development" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java (for Kotlin)
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install Latest Kotlin Compiler
run: |
curl -s https://get.sdkman.io | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install kotlin
- name: Compile Kotlin files
run: |
mkdir -p out/classes
find src -name "*.kt" > sources.txt
kotlinc @sources.txt -include-runtime -d out/classes
- name: Create Manifest File
run: |
echo "Manifest-Version: 1.0" > MANIFEST.MF
echo "Main-Class: MainKt" >> MANIFEST.MF
- name: Package Executable JAR
run: |
jar cfm out/TestRunner.jar MANIFEST.MF -C out/classes .
- name: Run Tests and Fail on "Failed"
run: |
set -o pipefail
OUTPUT=$(kotlin out/TestRunner.jar | tee output.log)
echo "$OUTPUT"
echo "$OUTPUT" | grep -q "Failed" && exit 1 || echo "All tests passed"
10 changes: 10 additions & 0 deletions .idea/artifacts/Finance_Tracker_jar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: MainKt