2024-02-21 15:29:50 +00:00
|
|
|
name: "SCALE: catalog-tests"
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2024-02-22 00:08:32 +00:00
|
|
|
- ".github/workflows/catalog-template-test.yaml"
|
|
|
|
- ".github/workflows/catalog-test.yaml"
|
|
|
|
- "templates/*"
|
|
|
|
- "templates/**"
|
|
|
|
- "templates/**/*"
|
2024-02-21 15:29:50 +00:00
|
|
|
jobs:
|
|
|
|
catalog-tests:
|
|
|
|
name: Test SCALE Catalog Templates
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 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"
|
2024-02-22 00:08:32 +00:00
|
|
|
|
2024-02-21 16:39:52 +00:00
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
2024-02-21 15:29:50 +00:00
|
|
|
name: Checkout-validate
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
repository: truecharts/catalog_validation
|
|
|
|
path: .catalog_validation
|
2024-02-22 00:08:32 +00:00
|
|
|
|
2024-02-21 15:29:50 +00:00
|
|
|
- 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
|
2024-02-22 00:08:32 +00:00
|
|
|
|
2024-02-21 15:29:50 +00:00
|
|
|
- name: Checkout
|
2024-02-21 16:39:52 +00:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
2024-02-21 15:29:50 +00:00
|
|
|
with:
|
|
|
|
repository: truecharts/catalog
|
|
|
|
path: catalog
|
2024-02-22 00:08:32 +00:00
|
|
|
|
2024-02-21 15:29:50 +00:00
|
|
|
- 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
|