2023-04-15 04:21:00 +08:00
|
|
|
name: check-and-test
|
|
|
|
|
|
|
|
on:
|
2023-11-16 20:45:10 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "*"
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- "renovate/**"
|
2023-04-15 04:21:00 +08:00
|
|
|
|
2023-10-13 16:04:27 +00:00
|
|
|
env:
|
|
|
|
# renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
2024-07-27 00:42:36 +00:00
|
|
|
HELM_UNITTEST_VERSION: "v0.5.2"
|
2023-10-13 16:04:27 +00:00
|
|
|
|
2023-04-15 04:21:00 +08:00
|
|
|
jobs:
|
|
|
|
check-and-test:
|
|
|
|
runs-on: ubuntu-latest
|
2024-07-20 00:40:11 +00:00
|
|
|
container: alpine/helm:3.15.3
|
2023-04-15 04:21:00 +08:00
|
|
|
steps:
|
|
|
|
- name: install tools
|
|
|
|
run: |
|
2023-10-13 16:04:27 +00:00
|
|
|
apk update
|
|
|
|
apk add --update make nodejs npm yamllint
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: install chart dependencies
|
|
|
|
run: helm dependency build
|
2023-04-15 04:21:00 +08:00
|
|
|
- name: lint
|
|
|
|
run: helm lint
|
|
|
|
- name: template
|
2023-10-13 16:04:27 +00:00
|
|
|
run: helm template --debug gitea-helm .
|
2023-04-15 04:21:00 +08:00
|
|
|
- name: unit tests
|
|
|
|
run: |
|
2023-10-13 16:04:27 +00:00
|
|
|
helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest
|
2023-04-15 04:21:00 +08:00
|
|
|
make unittests
|
|
|
|
- name: verify readme
|
|
|
|
run: |
|
|
|
|
make readme
|
|
|
|
git diff --exit-code --name-only README.md
|
|
|
|
- name: yaml lint
|
|
|
|
uses: https://github.com/ibiqlik/action-yamllint@v3
|