Fix get last id query #122
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: OSCAR E2E Testing | |
| on: | |
| push: | |
| branches: [ main, dev ] | |
| pull_request: | |
| branches: [ main, dev ] | |
| workflow_dispatch: | |
| env: | |
| JAVA_VERSION: '21' | |
| NODE_VERSION: '22' | |
| OSCAR_DIR: 'web/oscar-viewer' | |
| POSTGIS_DIR: 'dist/release/postgis' | |
| DIST_DIR: './build/distributions' | |
| jobs: | |
| Build: | |
| runs-on: self-hosted | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| repository: Botts-Innovative-Research/osh-oakridge-buildnode | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ env.JAVA_VERSION }} | |
| distribution: 'zulu' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| # cache: 'npm' | |
| cache-dependency-path: ${{ env.OSCAR_DIR }}/package-lock.json | |
| - name: Install oscar-viewer dependencies | |
| working-directory: ${{ env.OSCAR_DIR }} | |
| run: npm i | |
| - name: Build oscar-viewer | |
| working-directory: ${{ env.OSCAR_DIR }} | |
| run: npm run build | |
| - name: Install Cypress | |
| working-directory: ${{ env.OSCAR_DIR }} | |
| run: npx cypress install | |
| - name: Verify Rapiscan simulator running | |
| run: | | |
| "Get-Process srls" | |
| "netstat -aon | findstr 1601" | |
| shell: powershell | |
| - name: Verify Aspect simulator running | |
| run: | | |
| "Get-Process AspectHardwareEmulator" | |
| "netstat -aon | findstr 502" | |
| shell: powershell | |
| - name: Build PostGIS Docker Image | |
| working-directory: "test" | |
| run: docker build . --tag=test-oscar-postgis | |
| - name: Run Test PostGIS Instance | |
| working-directory: "test" | |
| run: ./test-run-postgis.bat | |
| - name: Build with Gradle | |
| run: ./gradlew clean build -x osgi | |
| env: | |
| SONY_H264_AUTH_IP: ${{ secrets.SONY_H264_AUTH_IP }} | |
| SONY_H264_NO_AUTH_IP: ${{ secrets.SONY_H264_NO_AUTH_IP }} | |
| SONY_MJPEG_AUTH_IP: ${{ secrets.SONY_MJPEG_AUTH_IP }} | |
| SONY_MJPEG_NO_AUTH_IP: ${{ secrets.SONY_MJPEG_NO_AUTH_IP }} | |
| AXIS_H264_AUTH_IP: ${{ secrets.AXIS_H264_AUTH_IP }} | |
| AXIS_H264_NO_AUTH_IP: ${{ secrets.AXIS_H264_NO_AUTH_IP }} | |
| AXIS_MJPEG_AUTH_IP: ${{ secrets.AXIS_MJPEG_AUTH_IP }} | |
| AXIS_MJPEG_NO_AUTH_IP: ${{ secrets.AXIS_MJPEG_NO_AUTH_IP }} | |
| RPM_HOST: "localhost" | |
| # Cypress test setup | |
| - name: Unpack OSH node | |
| working-directory: ${{ env.DIST_DIR }} | |
| shell: powershell | |
| run: | | |
| $zip = Get-ChildItem -Filter "oscar-*.zip" | Sort-Object Name | Select-Object -First 1 | |
| Expand-Archive -Path $zip.FullName -DestinationPath . | |
| # - name: Copy environment variables to test config | |
| # | |
| # - name: Load test data into current PostGIS database | |
| # | |
| # - name: Load test videos | |
| # | |
| # - name: Launch test node | |
| # - name: Run Cypress UI tests | |
| # working-directory: ${{ env.OSCAR_DIR }} | |
| # run: npm test | |
| - name: Cleanup PostGIS Test Instance | |
| if: always() | |
| run: docker rm -f test-postgis | |