diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6ab8a1f..faf66aa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -94,8 +94,16 @@ jobs: path: versions.json if-no-files-found: error + schema-check: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 + + - run: npx -p ajv-cli@3.3.0 ajv compile -s schema.json + upload-to-s3: - needs: [package-tests, full-test] + needs: [package-tests, full-test, schema-check] if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest timeout-minutes: 60 @@ -141,5 +149,7 @@ jobs: run: rm -fv versions.json - name: Download the current versions.json from S3 run: curl -LO https://julialang-s3.julialang.org/bin/versions.json + - name: Validate versions.json against schema + run: npx -p ajv-cli@3.3.0 ajv -s schema.json -d versions.json - name: Run the post-build tests on the versions.json that we downloaded from S3 run: julia --project test/more_tests.jl versions.json diff --git a/schema.json b/schema.json index c79c1c6..08c5338 100644 --- a/schema.json +++ b/schema.json @@ -67,6 +67,14 @@ ".exe", ".gz", ".zip" + ], + "allOf": [ + { + "pattern": "^https://" + }, + { + "pattern": "\\.(?:dmg|exe|gz|zip)$" + } ] }, "asc": {