Skip to content

[dysnix/app] add multi-component mode #690

[dysnix/app] add multi-component mode

[dysnix/app] add multi-component mode #690

Workflow file for this run

name: Lint and Test Charts
on: pull_request
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Run quintush/helm-unittest
uses: docker://quintush/helm-unittest:3.10.1-0.2.10
with:
entrypoint: ./.github/scripts/unit-test.sh
args: dysnix/
lint-test:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.12.2
-
uses: actions/setup-python@v2
with:
python-version: 3.7
-
uses: helm/chart-testing-action@v2.1.0
-
name: Config chart-testing
run: cp .github/ct.yaml $CT_CONFIG_DIR
-
name: Lint chart-testing
run: ct lint
-
name: Changes chart-testing
id: charts
# 1. get library chart list - /tmp/_library_charts
# 2. get list of the charts changed (striping ct control output) - /tmp/_changed_charts
# 3. create list of charts to test (excluding library charts) - $test_list
# 4. exclude library charts list, a comma separated list of library charts - $exclude_list
run: |
ls -1 dysnix/*/Chart.yaml | xargs grep -E "type:\s+library" | sed 's/\/Chart.yaml.*//' > /tmp/_library_charts || /bin/true
ct list-changed | sed '/^>>>.*/d' > /tmp/_changed_charts
test_list=$(grep -v -x -f /tmp/_library_charts /tmp/_changed_charts 2>/dev/null || /bin/true)
exclude_list=$(cat /tmp/_library_charts | sed '/^ *$/d;N;s/\n/,/' | sed 's/dysnix\///g')
if [[ -n "$test_list" ]]; then
echo "::set-output name=testing::true"
fi
if [[ -n "$exclude_list" ]]; then
echo "::set-output name=excluded-charts::--excluded-charts ${exclude_list}"
fi
-
name: Create Kubernetes Cluster (kind)
uses: helm/kind-action@v1.2.0
if: steps.charts.outputs.testing == 'true'
-
name: Install Charts chart-testing
run: ct install ${{ steps.charts.outputs.excluded-charts }}
if: steps.charts.outputs.testing == 'true'