50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
name: check-and-test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
# renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
|
HELM_UNITTEST_VERSION: "v1.0.3"
|
|
|
|
jobs:
|
|
check-and-test:
|
|
runs-on: ubuntu-latest
|
|
container: alpine/helm:4.1.4
|
|
steps:
|
|
- name: install tools
|
|
run: | # Hacky way of installing yamllint due to previous action failures, likely not needed after dependency fix is made on Alpine's side
|
|
apk update
|
|
apk add --update bash make nodejs npm ncurses python3 py3-pip
|
|
python3 -m venv /opt/venv
|
|
/opt/venv/bin/pip install yamllint
|
|
ln -s /opt/venv/bin/yamllint /usr/local/bin/yamllint
|
|
- uses: actions/checkout@v6
|
|
- name: install chart dependencies
|
|
run: helm dependency build
|
|
- name: lint
|
|
run: helm lint .
|
|
- name: template
|
|
run: helm template --debug gitea-helm .
|
|
- name: prepare unit test environment
|
|
# remove `--verify=false` once https://github.com/helm/helm/issues/31490 is resolved
|
|
run: |
|
|
helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest --verify=false
|
|
git submodule update --init --recursive
|
|
- name: unit tests
|
|
env:
|
|
TERM: xterm
|
|
run: |
|
|
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
|