Treat an empty raster or raster-DEM tile response as no data (#1551) #14644
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| contents: write | |
| jobs: | |
| code-hygiene: | |
| name: Code Hygiene | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - run: npm ci | |
| - run: npm run lint -- --max-warnings 0 | |
| if: '!cancelled()' | |
| - run: npm run lint-css | |
| if: '!cancelled()' | |
| - run: npm run generate-typings | |
| if: '!cancelled()' | |
| - run: npm run typecheck | |
| if: '!cancelled()' | |
| - run: npm run generate-docs | |
| - name: Build docs | |
| run: npm run docs | |
| - name: Check spelling | |
| # This need to run after the docs are built | |
| run: npm run spellcheck | |
| unit-tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Start display server | |
| run: nohup Xvfb & | |
| echo "DISPLAY=:0" >> $GITHUB_ENV | |
| - run: npm ci | |
| - run: npm run test-unit-ci | |
| - name: Upload coverage artifact | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: coverage-reports-unit-tests | |
| path: ${{ github.workspace }}/coverage/vitest/unit/coverage-final.json | |
| retention-days: 1 | |
| integration-tests: | |
| name: Integration tests | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Disable AppArmor | |
| if: runner.os == 'Linux' | |
| run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | |
| - run: npm ci | |
| - run: npm run build-dist | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: '!cancelled()' | |
| with: | |
| name: build-dist-${{ matrix.os }} | |
| path: dist/ | |
| - run: npm run test-integration-ci | |
| - name: Move files | |
| if: runner.os == 'Linux' | |
| run: | | |
| mkdir -p ${{ github.workspace }}/upload | |
| mv ${{ github.workspace }}/coverage/vitest/integration/coverage-final.json ${{ github.workspace }}/upload/coverage-final-integration.json | |
| mv ${{ github.workspace }}/coverage/query/coverage-final.json ${{ github.workspace }}/upload/coverage-final-query.json | |
| - name: Upload coverage artifact | |
| if: ${{ !cancelled() && runner.os == 'Linux' }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: coverage-reports-integration-tests | |
| path: | | |
| ${{ github.workspace }}/upload/coverage-final-integration.json | |
| ${{ github.workspace }}/upload/coverage-final-query.json | |
| retention-days: 1 | |
| render-tests: | |
| name: Render tests | |
| env: | |
| SPLIT_COUNT: 6 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| split: [0, 1, 2, 3, 4, 5] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 120 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: install CJK fonts for local ideographs render tests | |
| if: runner.os == 'Linux' | |
| run: sudo apt install fonts-noto-cjk | |
| - name: Disable AppArmor | |
| if: runner.os == 'Linux' | |
| run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | |
| - run: npm ci | |
| - name: Start display server | |
| if: runner.os == 'Linux' | |
| run: nohup Xvfb & | |
| echo "DISPLAY=:0" >> $GITHUB_ENV | |
| - run: npm run build-dist | |
| - name: Run Render tests | |
| run: npm run test-render | |
| env: | |
| CURRENT_SPLIT_INDEX: ${{ matrix.split }} | |
| - name: Move files | |
| if: runner.os == 'Linux' | |
| run: | | |
| mkdir -p ${{ github.workspace }}/upload | |
| mv ${{ github.workspace }}/coverage/render/coverage-final.json ${{ github.workspace }}/upload/coverage-final-render-${{ matrix.split }}.json | |
| - name: Upload coverage artifact | |
| if: ${{ !cancelled() && runner.os == 'Linux' }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: coverage-reports-render-tests-${{ matrix.split }} | |
| path: ${{ github.workspace }}/upload/coverage-final-render-${{ matrix.split }}.json | |
| retention-days: 1 | |
| - name: Upload render test failure | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: render-test-report-${{ matrix.os }}-${{ matrix.split }} | |
| path: ${{ github.workspace }}/test/integration/render/results.html | |
| build-tests: | |
| name: Build tests | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - run: npm ci | |
| - run: npm run build-dist | |
| - run: npm run test-build-ci | |
| benchmarks: | |
| name: Benchmarks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - run: npm ci | |
| - run: npm run bench | |
| merge-and-report: | |
| name: Merge coverage and report | |
| runs-on: ubuntu-latest | |
| needs: [unit-tests, integration-tests, render-tests] | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Download coverage reports | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c | |
| with: | |
| pattern: coverage-reports-* | |
| merge-multiple: true | |
| path: downloaded | |
| - name: Merge Coverage reports | |
| shell: bash | |
| run: npx nyc report -t ${{ github.workspace }}/downloaded --reporter lcov --reporter json --report-dir coverage-merged | |
| - name: Upload merged coverage report | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: merged-coverage-report | |
| path: coverage-merged | |
| - name: Code Coverage Annotation | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| uses: ggilder/codecoverage@3ae5dbe5d9ec0c038f4863cb42d902c4a5f25ae8 | |
| with: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| COVERAGE_FILE_PATH: "./coverage-merged/lcov.info" | |
| COVERAGE_FORMAT: "lcov" | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| files: ${{ github.workspace }}/coverage-merged/coverage-final.json | |
| verbose: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| disable_search: true |