-
Notifications
You must be signed in to change notification settings - Fork 78
58 lines (49 loc) · 1.59 KB
/
lint-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Lint and Test Open Metadata Helm Charts
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'LICENSE'
- 'NOTICE'
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE'
- 'NOTICE'
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# ct needs history to compare
fetch-depth: 0
- name: Determine default branch
run: |
DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
echo "default_branch=$DEFAULT_BRANCH" >> $GITHUB_ENV
echo "default_branch_ref=refs/heads/$DEFAULT_BRANCH" >> $GITHUB_ENV
- name: Install Helm
uses: azure/setup-helm@v3
- name: Add Helm repos
run: |
helm repo add opensearch https://opensearch-project.github.io/helm-charts/
helm repo add mysql https://charts.bitnami.com/bitnami
helm repo add airflow https://airflow-helm.github.io/charts
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install chart-testing
uses: helm/chart-testing-action@v2.0.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch=${{ env.default_branch }})
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --target-branch=${{ env.default_branch }} --check-version-increment=false