MHP Updates #6376
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: Lint/Test | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| node-version: [ latest ] | |
| steps: | |
| - uses: actions/checkout@master | |
| with: | |
| fetch-depth: 1 | |
| filter: blob:none | |
| sparse-checkout-cone-mode: false | |
| sparse-checkout: | | |
| /* | |
| !/_img/** | |
| - id: list_img_changes | |
| uses: tj-actions/changed-files@main | |
| with: | |
| files: | | |
| _img/** | |
| separator: "\n" | |
| - run: | | |
| set -euo pipefail | |
| changed="${{ steps.list_img_changes.outputs.all_changed_files }}" | |
| if [[ -z "${changed// }" ]]; then | |
| echo "No files to checkout under _img." | |
| exit 0 | |
| fi | |
| while IFS= read -r p; do | |
| [[ -z "$p" ]] && continue | |
| echo "Including: $p" | |
| git sparse-checkout add -- "$p" | |
| done <<< "$changed" | |
| git checkout -- . | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@master | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: | | |
| npm ci | |
| npm test |