@@ -10,12 +10,48 @@ jobs:
1010 run_sonar_scan :
1111 runs-on : ubuntu-latest
1212 steps :
13- - name : run tests and Sonar scan
14- env :
15- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
16- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
17- run : |
18- # shellcheck source=/dev/null
19- . ~/.asdf/plugins/java/set-java-home.bash
20- make download-dependencies
21- mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=NHSDigital_eps-FHIR-validator-lambda
13+ - uses : actions/setup-java@v4
14+ with :
15+ java-version : ' 21'
16+ distribution : ' corretto'
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+ with :
20+ ref : ${{ env.BRANCH_NAME }}
21+ fetch-depth : 0
22+
23+ # using git commit sha for version of action to ensure we have stable version
24+ - name : Install asdf
25+ uses : asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
26+ with :
27+ asdf_branch : v0.11.3
28+
29+ - name : Cache asdf
30+ uses : actions/cache@v4
31+ with :
32+ path : |
33+ ~/.asdf
34+ key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
35+ restore-keys: |
36+ ${{ runner.os }}-asdf-
37+
38+ - name : Install asdf dependencies in .tool-versions
39+ uses : asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
40+ with :
41+ asdf_branch : v0.11.3
42+ env :
43+ PYTHON_CONFIGURE_OPTS : --enable-shared
44+
45+ - name : make install
46+ run : |
47+ make install
48+
49+ - name : run tests and Sonar scan
50+ env :
51+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
52+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
53+ run : |
54+ # shellcheck source=/dev/null
55+ . ~/.asdf/plugins/java/set-java-home.bash
56+ make download-dependencies
57+ mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=NHSDigital_eps-FHIR-validator-lambda
0 commit comments