Skip to content

Commit b820e26

Browse files
define project manifest
1 parent 78eca8b commit b820e26

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

.github/workflows/check-tests.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,48 @@
11
# This is a basic workflow to help you get started with Actions
2-
32
name: Run Kotlin Check Tests
4-
53
# Controls when the workflow will run
64
on:
75
# Triggers the workflow on push or pull request events but only for the "main" and "development" branch
86
push:
97
branches: [ "main", "development" ]
108
pull_request:
119
branches: [ "main", "development" ]
12-
1310
# Allows you to run this workflow manually from the Actions tab
1411
workflow_dispatch:
15-
1612
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1713
jobs:
1814
# This workflow contains a single job called "build"
1915
build:
2016
# The type of runner that the job will run on
2117
runs-on: ubuntu-latest
22-
2318
# Steps represent a sequence of tasks that will be executed as part of the job
2419
steps:
2520
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2621
- name: Checkout code
2722
uses: actions/checkout@v4
2823

24+
2925
- name: Set up Java (for Kotlin)
3026
uses: actions/setup-java@v3
3127
with:
3228
distribution: 'temurin'
33-
java-version: '17'
29+
java-version: '19'
3430

3531
- name: Install Latest Kotlin Compiler
3632
run: |
3733
curl -s https://get.sdkman.io | bash
3834
source "$HOME/.sdkman/bin/sdkman-init.sh"
3935
sdk install kotlin
40-
41-
- name: Compile Kotlin files and create executable jar
42-
run: |
43-
mkdir -p out/classes
4436
45-
# Find source files
46-
find src -name "*.kt" > sources.txt
37+
- name: Compile Kotlin files
38+
run: |
39+
mkdir -p out
40+
find . -name "*.kt" > sources.txt
41+
kotlinc @sources.txt -include-runtime -d out/TestRunner.jar
4742
48-
# Compile Kotlin and include runtime in the JAR
49-
kotlinc @sources.txt -include-runtime -d out/TestRunner.jar -main MainKt
50-
43+
- name: Run Tests and Fail on "Failed"
44+
run: |
5145
set -o pipefail
5246
OUTPUT=$(kotlin out/TestRunner.jar | tee output.log)
5347
echo "$OUTPUT"
54-
echo "$OUTPUT" | grep -q "Failed" && exit 1 || echo "All tests passed"
48+
echo "$OUTPUT" | grep -q "Failed" && exit 1 || echo "All tests passed"

.idea/artifacts/Finance_Tracker_jar.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/META-INF/MANIFEST.MF

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Main-Class: MainKt
3+

0 commit comments

Comments
 (0)