-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.13 KB
/
unit-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Run All Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: '17'
- name: Install Groovy
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install groovy
source "$HOME/.sdkman/bin/sdkman-init.sh" && groovy -version # Verify installation
- name: Compile Groovy Classes
run: |
# Compile the Groovy classes
groovyc -d ./bin ./src/com/genexus/*.groovy
- name: Run All Tests
run: |
# Ensure the test directory is set up correctly
echo "Running all Groovy tests..."
source "$HOME/.sdkman/bin/sdkman-init.sh" # Ensure SDKMAN! is sourced
# Run all Groovy test files in the 'test' directory
find ./test -name '*.groovy' | while read testFile; do
echo "Running $testFile..."
groovy -cp ./bin "$testFile"
done
echo "All tests executed!"