Restructure repo to be a little cleaner (#445)
This commit is contained in:
committed by
GitHub
parent
80a28c36a6
commit
ffc823bccc
135
.github/workflows/apps.test.yaml
vendored
135
.github/workflows/apps.test.yaml
vendored
@@ -1,135 +0,0 @@
|
||||
name: "Apps: test"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
paths:
|
||||
- 'stable/**'
|
||||
- '!stable/*.md'
|
||||
- '!stable/README.md'
|
||||
- '!stable/README.md.gotmpl'
|
||||
- '!stable/app-readme.md'
|
||||
- '!stable/app-readme.md.gotmpl'
|
||||
- '!stable/docs/*'
|
||||
- 'incubator/**'
|
||||
- '!incubator/*.md'
|
||||
- '!incubator/README.md'
|
||||
- '!incubator/README.md.gotmpl'
|
||||
- '!incubator/app-readme.md'
|
||||
- '!incubator/app-readme.md.gotmpl'
|
||||
- '!incubator/docs/*'
|
||||
- 'develop/**'
|
||||
- '!develop/*.md'
|
||||
- '!develop/README.md'
|
||||
- '!develop/README.md.gotmpl'
|
||||
- '!develop/app-readme.md'
|
||||
- '!develop/app-readme.md.gotmpl'
|
||||
- '!develop/docs/*'
|
||||
- 'non-free/**'
|
||||
- '!non-free/*.md'
|
||||
- '!non-free/README.md'
|
||||
- '!non-free/README.md.gotmpl'
|
||||
- '!non-free/app-readme.md'
|
||||
- '!non-free/app-readme.md.gotmpl'
|
||||
- '!non-free/docs/*'
|
||||
- 'deprecated/**'
|
||||
- '!deprecated/*.md'
|
||||
- '!deprecated/README.md'
|
||||
- '!deprecated/README.md.gotmpl'
|
||||
- '!deprecated/app-readme.md'
|
||||
- '!deprecated/app-readme.md.gotmpl'
|
||||
- '!deprecated/docs/*'
|
||||
- '.github/workflows/apps.test.yaml'
|
||||
- '.github/ct-install.yaml'
|
||||
- '.github/ct-lint.yaml'
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
name: Get changed Apps
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
matrix: "{\"app\": ${{ steps.reduce.outputs.apps }} }"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
list-files: json
|
||||
filters: |
|
||||
changed:
|
||||
- 'stable/**'
|
||||
- 'incubator/**'
|
||||
- 'develop/**'
|
||||
- 'deprecated/**'
|
||||
- 'non-free/**'
|
||||
- run: echo '${{ toJson(steps.filter.outputs) }}' > changes.json
|
||||
- id: reduce
|
||||
run: |
|
||||
APPS=$(jq --raw-output '.changed_files | fromjson | .[] |= sub("(?<filepath>(?<first_directory>(?<root1>[\/]?)[^\/]+\/)(?<second_directory>(?<root2>[\/]?)[^\/]+)(?<extra_paths>.+))"; "\(.second_directory)") | unique' changes.json)
|
||||
echo ::set-output name=apps::${APPS}
|
||||
|
||||
app-tests:
|
||||
needs: [changes]
|
||||
name: App Tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.changes.outputs.matrix) }}
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare-Lint
|
||||
id: prep-lint
|
||||
run: |
|
||||
if test -f "./stable/${{ matrix.app }}/Chart.yaml"; then
|
||||
train="stable"
|
||||
elif test -f "./incubator/${{ matrix.app }}/Chart.yaml"; then
|
||||
train="incubator"
|
||||
elif test -f "./deprecated/${{ matrix.app }}/Chart.yaml"; then
|
||||
train="deprecated"
|
||||
elif test -f "./non-free/${{ matrix.app }}/Chart.yaml"; then
|
||||
train="non-free"
|
||||
else
|
||||
train="develop"
|
||||
fi
|
||||
echo ::set-output name=train::${train}
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.5.3
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
|
||||
|
||||
- name: Run chart-testing (lint)
|
||||
id: lint
|
||||
run: ct lint --config .github/ct-lint.yaml --charts '${{ steps.prep-lint.outputs.train }}/${{ matrix.app }}'
|
||||
|
||||
- name: Create k3d cluster
|
||||
uses: nolar/setup-k3d-k3s@v1
|
||||
with:
|
||||
version: v1.19
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config .github/ct-install.yaml --charts '${{ steps.prep-lint.outputs.train }}/${{ matrix.app }}'
|
||||
|
||||
app-tests-complete:
|
||||
needs: [app-tests]
|
||||
name: Apps Test Complete
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: complete message
|
||||
run: echo "App Tests Completed Successfully"
|
||||
Reference in New Issue
Block a user