diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5ef7735..3a2cb4b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,6 +12,7 @@ name: "CodeQL" on: + workflow_dispatch: push: branches: [ main ] pull_request: @@ -38,11 +39,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -53,10 +54,10 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) #- name: Autobuild - # uses: github/codeql-action/autobuild@v2 + # uses: github/codeql-action/autobuild@v3 - if: matrix.language == 'cpp' || matrix.language == 'csharp' name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -72,4 +73,4 @@ jobs: sh build.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/junit-platform-console-standalone-1.13.4.jar b/.github/workflows/junit-platform-console-standalone-1.13.4.jar new file mode 100644 index 0000000..ea9e51e Binary files /dev/null and b/.github/workflows/junit-platform-console-standalone-1.13.4.jar differ diff --git a/.github/workflows/junit-platform-console-standalone-1.8.1.jar b/.github/workflows/junit-platform-console-standalone-1.8.1.jar deleted file mode 100644 index 7a90490..0000000 Binary files a/.github/workflows/junit-platform-console-standalone-1.8.1.jar and /dev/null differ diff --git a/.github/workflows/junit.yml b/.github/workflows/junit.yml index fdcd828..4723de7 100644 --- a/.github/workflows/junit.yml +++ b/.github/workflows/junit.yml @@ -23,13 +23,13 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'zulu' # See 'Supported distributions' for available options java-version: '11' # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Runs a single command using the runners shell - name: build project with tests @@ -40,12 +40,18 @@ jobs: # Runs a single command using the runners shell - name: run JUnit tests run: | + CP_TEST="./SystaRESTServer/bin" + for jarfile in ./SystaRESTServer/lib/*.jar; do + CP_TEST="$CP_TEST:$jarfile" + done ls -al ./SystaRESTServer/bin/ - java -jar .github/workflows/junit-platform-console-standalone-1.8.1.jar -cp ./SystaRESTServer/bin/ --scan-classpath -reports-dir='junit-reports/' + echo "Searching for data00_09_00.txt..." + find / -name 'data00_09_00.txt' 2>/dev/null || echo "File not found" + java -jar .github/workflows/junit-platform-console-standalone-1.13.4.jar -cp "$CP_TEST" --scan-classpath -reports-dir='junit-reports/' # Publish the test results - name: Publish Test Report - uses: mikepenz/action-junit-report@v3 + uses: mikepenz/action-junit-report@v5 if: always() # always run even if the previous step fails with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 666f2dc..d5986a7 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -3,6 +3,7 @@ name: Pylint # Controls when the workflow will run on: + workflow_dispatch: # Triggers the workflow on push or pull request events but only for the main branch push: branches: [ main ] @@ -15,9 +16,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - name: Install dependencies diff --git a/.github/workflows/scc.yml b/.github/workflows/scc.yml index 01c5dad..04214a6 100644 --- a/.github/workflows/scc.yml +++ b/.github/workflows/scc.yml @@ -22,7 +22,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run scc id: scc #get the action from iryanbell's repo diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 08baca2..59e8b95 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -3,6 +3,7 @@ name: Shellcheck # Controls when the workflow will run on: + workflow_dispatch: # Triggers the workflow on push or pull request events but only for the main branch push: branches: [ main ] @@ -15,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master + uses: ludeeus/action-shellcheck@2.0.0 env: SHELLCHECK_OPTS: -e SC1091 diff --git a/SystaRESTServer/src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java b/SystaRESTServer/src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java index 894da31..ce3a1b2 100644 --- a/SystaRESTServer/src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java +++ b/SystaRESTServer/src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java @@ -99,9 +99,9 @@ class SystaRESTAPITest extends JerseyTest { // do not name this setup() @BeforeAll // fix incompatibility with JUnit5 public static void initializeTestData() { // Made static as @BeforeAll for non-PER_CLASS lifecycle requires it - //String testDir = SystaRESTAPITest.class.getClass().getResource(".").getPath(); - // TODO improve path handling of tests - String testDir = System.getProperty("user.dir") + "/bin/" + SystaRESTAPITest.class.getPackageName().replace('.', '/') + "/"; + String testDir = this.getClass().getResource(".").getPath(); + // TODO improve path handling of tests + //String testDir = System.getProperty("user.dir") + "SystaRESTServer/bin/" + SystaRESTAPITest.class.getPackageName().replace('.', '/') + "/"; String[] TEST_DATA_FILES = { testDir + "data00_09_00.txt", // IDX_DATA00_09_00 testDir + "data01_09_00.txt", // IDX_DATA01_09_00