name: "SCALE: catalog-tests" on: pull_request: paths: - ".github/workflows/catalog-template-test.yaml" - ".github/workflows/catalog-test.yaml" - "templates/*" - "templates/**" - "templates/**/*" jobs: catalog-tests: name: Test SCALE Catalog Templates runs-on: ubuntu-latest steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 name: Checkout with: fetch-depth: 100 ref: ${{ inputs.checkoutCommit }} - name: Setting repo parent dir as safe safe.directory run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 name: Checkout-validate with: fetch-depth: 1 repository: truecharts/catalog_validation path: .catalog_validation - name: install catalog_validation shell: bash run: | cd .catalog_validation pip install -r requirements.txt pip install -U --no-cache-dir . cd - - name: Fetch and Verify dependencies shell: bash if: steps.list-changed.outputs.detected == 'true' env: charts_path: "./" run: | CHANGED=$(echo '${{ steps.list-changed.outputs.CHANGED_CHARTS }}' | jq --raw-output '.[]') ./charttool deps ${PWD}/charts - name: Checkout uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 with: repository: truecharts/catalog path: catalog - name: Build Complete Catalog shell: bash if: steps.list-changed.outputs.detected == 'true' env: charts_path: "./" run: | CHANGED=$(echo '${{ steps.list-changed.outputs.CHANGED_CHARTS }}' | jq --raw-output '.[]') ./charttool buildSCALE ${PWD}/charts - name: Test Complete Catalog shell: bash if: steps.list-changed.outputs.detected == 'true' run: | echo "Starting Catalog Validation" python3 .catalog_validation/catalog_validation/scripts/catalog_validate.py validate --path "${PWD}/catalog" --ignore-catalog-json