build(deps): update github actions (main) #1555
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: Schema | |
| on: [pull_request] | |
| env: | |
| CHARMCRAFT_JSON: schema/charmcraft.json | |
| jobs: | |
| diff-schema: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup project | |
| run: | | |
| sudo apt-get update | |
| make setup | |
| - name: Run generator script | |
| run: | | |
| uv run --frozen \ | |
| python tools/schema.py > generated_schema.json | |
| - name: Check with stored schema | |
| run: | | |
| test -f $CHARMCRAFT_JSON && | |
| diff generated_schema.json $CHARMCRAFT_JSON | |
| validate-schema: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| - name: Install ajv cli | |
| run: npm install -g ajv-cli | |
| - name: Run ajv | |
| run: | | |
| # Don't fail immediately if one validation fails | |
| EXIT_CODE=0 | |
| for proj_file in tests/spread/smoketests/basic/charmcraft*; do | |
| if ! ajv validate -s $CHARMCRAFT_JSON \ | |
| -d $proj_file \ | |
| --strict=false --spec=draft2020; then | |
| EXIT_CODE=1 | |
| fi | |
| done | |
| exit $EXIT_CODE |