|
| 1 | +name: NodeJS with Grunt |
| 2 | +on: |
| 3 | + |
| 4 | + push: |
| 5 | + branches: [ "main" ] |
| 6 | + pull_request: |
| 7 | + branches: [ "main" ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + node-version: [18.x, 20.x, 22.x] |
| 16 | + |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Use Node.js ${{ matrix.node-version }} |
| 21 | + uses: actions/setup-node@v4 |
| 22 | + with: |
| 23 | + node-version: ${{ matrix.node-version }} |
| 24 | + |
| 25 | + - name: Build |
| 26 | + run: | |
| 27 | + npm install |
| 28 | + grunt |
| 29 | + - name: Cache |
| 30 | + |
| 31 | + with: |
| 32 | + # A list of files, directories, and wildcard patterns to cache and restore |
| 33 | + path: |
| 34 | + # An explicit key for restoring and saving the cache |
| 35 | + key: |
| 36 | + # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. |
| 37 | + restore-keys: # optional |
| 38 | + # The chunk size used to split up large files during upload, in bytes |
| 39 | + upload-chunk-size: # optional |
| 40 | + # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms |
| 41 | + enableCrossOsArchive: # optional, default is false |
| 42 | + # Fail the workflow if cache entry is not found |
| 43 | + fail-on-cache-miss: # optional, default is false |
| 44 | + # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache |
| 45 | + lookup-only: # optional, default is false |
| 46 | + # Run the post step to save the cache even if another step before fails |
| 47 | + save-always: # optional, default is false |
| 48 | + |
| 49 | + |
0 commit comments