Skip to content

Commit

Permalink
ci: run json tool on 22.04 rather than 20.04 (canonical#1823)
Browse files Browse the repository at this point in the history
  • Loading branch information
holmanb authored Nov 10, 2022
1 parent 60e2b28 commit 4dfb684
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ jobs:
schema-format:
strategy:
fail-fast: false
matrix:
lint-with:
- {tip-versions: true, os: ubuntu-latest}
name: Check json format
runs-on: ${{ matrix.lint-with.os }}
runs-on: ubuntu-22.04
steps:
- name: "Checkout #1"
uses: actions/checkout@v3.0.0
Expand Down
7 changes: 5 additions & 2 deletions cloudinit/config/schemas/schema-cloud-config-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@
"run-user": {
"type": "string",
"description": "User to run module commands as. If install-method: pip, the pip install runs as this user as well."
},
},
"ansible_config": {
"description": "Sets the ANSIBLE_CONFIG environment variable. If set, overrides default config.",
"type": "string"
Expand All @@ -472,7 +472,10 @@
"repositories": {
"type": "array",
"items": {
"required": ["path", "source"],
"required": [
"path",
"source"
],
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
9 changes: 4 additions & 5 deletions tools/check_json_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# requires python 3.9 for --indent
#
file=$1
before=$(cat "$file")
python3 -m json.tool --indent 2 "$file" "$file"
after=$(cat "$file")
test "$before" = "$after"
exit $?
before=$(cat "$file") &&
python3 -m json.tool --indent 2 "$file" "$file" &&
after=$(cat "$file") &&
test "$before" = "$after"

0 comments on commit 4dfb684

Please sign in to comment.