Detect unused variables in tests (#97) #319
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: build | |
| on: | |
| - push | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| shell: /usr/bin/bash -l -e -o pipefail {0} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: setup java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: | | |
| 21 | |
| 17 | |
| - name: savant setup | |
| run: | | |
| curl -O https://repository.savantbuild.org/org/savantbuild/savant-core/2.0.0/savant-2.0.0.tar.gz | |
| tar xzvf savant-2.0.0.tar.gz | |
| savant-2.0.0/bin/sb --version | |
| SAVANT_PATH=$(realpath -s "./savant-2.0.0/bin") | |
| echo "${SAVANT_PATH}" >> $GITHUB_PATH | |
| mkdir -p ~/.savant/plugins | |
| # For now, using the JDK that comes on the GHA runner | |
| cat << EOF > ~/.savant/plugins/org.savantbuild.plugin.java.properties | |
| 17=${JAVA_HOME_17_X64} | |
| 21=${JAVA_HOME_21_X64} | |
| EOF | |
| echo "~/.savant/plugins/org.savantbuild.plugin.java.properties" | |
| cat ~/.savant/plugins/org.savantbuild.plugin.java.properties | |
| # Takes some time, better to tell difference between this step and actual test run time | |
| - name: compile/pull Savant dependencies | |
| run: | | |
| $JAVA_HOME/bin/java -version | |
| sb --version | |
| sb clean compile | |
| - name: set locale | |
| run: | | |
| # MessageTest.java expects a US/english locale | |
| echo "LANG=en_US.utf8" >> $GITHUB_ENV | |
| - name: run tests/integrate | |
| run: | | |
| sb clean int | |
| - name: capture reports | |
| uses: actions/upload-artifact@v4 | |
| if: success() || failure() # always run even if the previous step fails | |
| with: | |
| name: testng_reports | |
| path: build/test-reports/ |