From b3f9ad65442c5cf67ad568f0adf0728199b63273 Mon Sep 17 00:00:00 2001 From: MakMuftic Date: Mon, 20 May 2024 19:35:00 +0200 Subject: [PATCH] restructure workflow file --- .github/workflows/validate-json.yml | 70 +++++++++++------------------ 1 file changed, 27 insertions(+), 43 deletions(-) diff --git a/.github/workflows/validate-json.yml b/.github/workflows/validate-json.yml index 1920ef9..198ed19 100644 --- a/.github/workflows/validate-json.yml +++ b/.github/workflows/validate-json.yml @@ -9,52 +9,36 @@ concurrency: cancel-in-progress: true jobs: - validate-devnet-json: + validate-json: runs-on: ubuntu-latest + strategy: + matrix: + config: + - name: validate-devnet-json + schema: /schema.json + json: /testnet/shared-config-dev.json + - name: validate-devnet-v3-json + schema: /schema-v3.json + json: /testnet/shared-config-dev-v3.json + - name: validate-testnet-json + schema: /schema.json + json: /testnet/shared-config-test.json +# - name: validate-testnet-v3-json +# schema: /schema-v3.json +# json: /testnet/shared-config-test-v3.json + - name: validate-mainnet-json + schema: /schema.json + json: /mainnet/shared-config-mainnet.json +# - name: validate-mainnet-v3-json +# schema: /schema-v3.json +# json: /mainnet/shared-config-mainnet-v3.json + - name: validate-x-json + schema: /schema.json + json: /testnet/shared-config-x.json steps: - uses: actions/checkout@v1 - name: Validate JSON uses: nhalstead/validate-json-action@0.1.3 with: - schema: /schema.json - jsons: /testnet/shared-config-dev.json - - validate-devnet-v3-json: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Validate JSON - uses: nhalstead/validate-json-action@0.1.3 - with: - schema: /schema-v3.json - jsons: /testnet/shared-config-dev-v3.json - - validate-testnet-json: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Validate JSON - uses: nhalstead/validate-json-action@0.1.3 - with: - schema: /schema.json - jsons: /testnet/shared-config-test.json - - validate-mainnet-json: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Validate JSON - uses: nhalstead/validate-json-action@0.1.3 - with: - schema: /schema.json - jsons: /mainnet/shared-config-mainnet.json - - validate-x-json: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Validate JSON - uses: nhalstead/validate-json-action@0.1.3 - with: - schema: /schema.json - jsons: /testnet/shared-config-x.json \ No newline at end of file + schema: ${{ matrix.config.schema }} + jsons: ${{ matrix.config.json }}