agama/.github/workflows/ci-profile-schema.yml
Ladislav Slezák 94870bc0f0
[SLE-16.0] Cache installed Ruby gems in CI (#3528)
## Problems

- Old versions of GitHub Actions (they use old unsupported NodeJS v20,
GitHub prints a ["Node.js 20 actions are deprecated"
](https://github.com/agama-project/agama/actions/runs/26086960005)
warning)
- Installing the needed Ruby gems takes quite long time (about [one and
half
minute](https://github.com/agama-project/agama/actions/runs/26175301761/job/77003739150#step:9:7))

## Solution

- Update the GitHub Action versions
- Cache the installed Ruby gems, restoring the cache and running Bundler
now takes [just about 15
seconds](https://github.com/agama-project/agama/actions/runs/26182626931/job/77029525706#step:8:17).
So the test run is it at least more than one minute faster!

## Testing

- Tested with the updated GitHub Actions
2026-05-21 09:48:50 +02:00

56 lines
1.4 KiB
YAML

name: CI - Profile schema
permissions:
contents: read
on:
push:
paths:
# NOTE: GitHub Actions do not allow using YAML references, the same path
# list is used below for the pull request event. Keep both lists in sync!!
# this file as well
- .github/workflows/ci-profile-schema.yml
# any change in the schema definitions
- rust/agama-lib/share/*.schema.json
pull_request:
paths:
# NOTE: GitHub Actions do not allow using YAML references, the same path
# list is used above for the push event. Keep both lists in sync!!
# this file as well
- .github/workflows/ci-profile-schema.yml
# any change in the schema definitions
- rust/agama-lib/share/*.schema.json
# allow running manually
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v6
with:
# checkout only the directory with the schema
sparse-checkout: |
rust/agama-lib/share
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 22
cache: npm
cache-dependency-path: rust/agama-lib/share
- name: Install Node Packages
run: npm ci
working-directory: rust/agama-lib/share
- name: Validate the schema
run: npm run validate
working-directory: rust/agama-lib/share