ci: more testing
This commit is contained in:
parent
92dca8d89f
commit
4e0c85d593
1 changed files with 86 additions and 87 deletions
|
@ -21,7 +21,7 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# lint-node:
|
# lint-node:
|
||||||
# runs-on: self-hosted
|
# runs-on: docker
|
||||||
# steps:
|
# steps:
|
||||||
# - run: cat /etc/os-release
|
# - run: cat /etc/os-release
|
||||||
|
|
||||||
|
@ -37,13 +37,54 @@ jobs:
|
||||||
# - run: make readme
|
# - run: make readme
|
||||||
# - run: git diff --exit-code --name-only README.md
|
# - run: git diff --exit-code --name-only README.md
|
||||||
|
|
||||||
lint-helm:
|
# lint-helm:
|
||||||
|
# runs-on: docker
|
||||||
|
# steps:
|
||||||
|
# - run: cat /etc/os-release
|
||||||
|
|
||||||
|
# - run: ps axf
|
||||||
|
|
||||||
|
# - uses: actions/checkout@v4
|
||||||
|
# with:
|
||||||
|
# show-progress: false
|
||||||
|
# fetch-depth: 0
|
||||||
|
|
||||||
|
# - uses: ./.forgejo/actions/setup
|
||||||
|
|
||||||
|
# - name: install chart-testing
|
||||||
|
# uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||||
|
# with:
|
||||||
|
# version: ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||||
|
|
||||||
|
# - name: install helm
|
||||||
|
# uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
|
||||||
|
# with:
|
||||||
|
# version: ${{ env.HELM_VERSION }}
|
||||||
|
|
||||||
|
# - name: install helm-unittest
|
||||||
|
# run: helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest
|
||||||
|
|
||||||
|
# - run: helm dependency build
|
||||||
|
|
||||||
|
# - run: yamllint -f colored .
|
||||||
|
# - run: helm lint
|
||||||
|
# - run: helm template --debug gitea-helm .
|
||||||
|
# - run: make unittests
|
||||||
|
# - run: ct lint --config tools/ct.yml --charts .
|
||||||
|
|
||||||
|
e2e:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
k8s:
|
||||||
|
# from https://hub.docker.com/r/kindest/node/tags
|
||||||
|
# - v1.25.3 # renovate: kindest
|
||||||
|
- v1.28.0 # renovate: kindest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: cat /etc/os-release
|
- run: cat /etc/os-release
|
||||||
|
|
||||||
- run: ps axf
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
@ -51,95 +92,53 @@ jobs:
|
||||||
|
|
||||||
- uses: ./.forgejo/actions/setup
|
- uses: ./.forgejo/actions/setup
|
||||||
|
|
||||||
- name: install chart-testing
|
- name: Install chart-testing
|
||||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||||
with:
|
with:
|
||||||
version: ${{ env.HELM_CHART_TESTING_VERSION }}
|
version: ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||||
|
|
||||||
- name: install helm
|
# - name: install docker
|
||||||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
|
# run: |
|
||||||
|
# install -m 0755 -d /etc/apt/keyrings
|
||||||
|
# curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
|
# chmod a+r /etc/apt/keyrings/docker.gpg
|
||||||
|
# echo \
|
||||||
|
# "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
|
||||||
|
# $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||||
|
# tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
# apt-get update -qq
|
||||||
|
# apt-get -q install -qq \
|
||||||
|
# docker-ce \
|
||||||
|
# docker-ce-cli \
|
||||||
|
# containerd.io \
|
||||||
|
# ;
|
||||||
|
|
||||||
|
# - run: pip3 install yamllint yamale
|
||||||
|
|
||||||
|
# - name: install kind ${{ env.KIND_VERSION }}
|
||||||
|
# run: |
|
||||||
|
# curl -Lo /usr/local/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64"
|
||||||
|
# chmod +x /usr/local/bin/kind
|
||||||
|
# kind --version
|
||||||
|
|
||||||
|
# - name: install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||||
|
# run: |
|
||||||
|
# curl -LO "https://github.com/helm/chart-testing/releases/download/${HELM_CHART_TESTING_VERSION}/chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
||||||
|
# tar -C "/usr/local/bin" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" ct
|
||||||
|
# mkdir /etc/ct
|
||||||
|
# tar --strip 1 -C "/etc/ct" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" etc
|
||||||
|
# rm "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
||||||
|
# ct --version
|
||||||
|
|
||||||
|
- run: docker info
|
||||||
|
|
||||||
|
- name: Create kind cluster
|
||||||
|
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.HELM_VERSION }}
|
node_image: kindest/node:${{ matrix.k8s }}
|
||||||
|
version: ${{ env.KIND_VERSION }}
|
||||||
|
|
||||||
- name: install helm-unittest
|
- run: kubectl get no -o wide
|
||||||
run: helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest
|
|
||||||
|
|
||||||
- run: helm dependency build
|
|
||||||
|
|
||||||
- run: yamllint -f colored .
|
|
||||||
- run: helm lint
|
|
||||||
- run: helm template --debug gitea-helm .
|
|
||||||
- run: make unittests
|
|
||||||
- run: ct lint --config tools/ct.yml --charts .
|
|
||||||
|
|
||||||
# e2e:
|
|
||||||
# runs-on: self-hosted
|
|
||||||
|
|
||||||
# strategy:
|
|
||||||
# matrix:
|
|
||||||
# k8s:
|
|
||||||
# # from https://hub.docker.com/r/kindest/node/tags
|
|
||||||
# # - v1.25.3 # renovate: kindest
|
|
||||||
# - v1.28.0 # renovate: kindest
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - run: cat /etc/os-release
|
|
||||||
|
|
||||||
# - uses: actions/checkout@v4
|
|
||||||
# with:
|
|
||||||
# show-progress: false
|
|
||||||
# fetch-depth: 0
|
|
||||||
|
|
||||||
# - uses: ./.forgejo/actions/setup
|
|
||||||
# - uses: ./.forgejo/actions/setup-node
|
|
||||||
|
|
||||||
# - name: install docker
|
|
||||||
# run: |
|
|
||||||
# install -m 0755 -d /etc/apt/keyrings
|
|
||||||
# curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
|
||||||
# chmod a+r /etc/apt/keyrings/docker.gpg
|
|
||||||
# echo \
|
|
||||||
# "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
|
|
||||||
# $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
||||||
# tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
||||||
# apt-get update -qq
|
|
||||||
# apt-get -q install -qq \
|
|
||||||
# docker-ce \
|
|
||||||
# docker-ce-cli \
|
|
||||||
# containerd.io \
|
|
||||||
# ;
|
|
||||||
|
|
||||||
# # - run: pip3 install yamllint yamale
|
|
||||||
|
|
||||||
# # - name: install kind ${{ env.KIND_VERSION }}
|
|
||||||
# # run: |
|
|
||||||
# # curl -Lo /usr/local/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64"
|
|
||||||
# # chmod +x /usr/local/bin/kind
|
|
||||||
# # kind --version
|
|
||||||
|
|
||||||
# # - name: install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
|
|
||||||
# # run: |
|
|
||||||
# # curl -LO "https://github.com/helm/chart-testing/releases/download/${HELM_CHART_TESTING_VERSION}/chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
|
||||||
# # tar -C "/usr/local/bin" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" ct
|
|
||||||
# # mkdir /etc/ct
|
|
||||||
# # tar --strip 1 -C "/etc/ct" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" etc
|
|
||||||
# # rm "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
|
||||||
# # ct --version
|
|
||||||
|
|
||||||
# - run: docker info
|
|
||||||
|
|
||||||
# - name: Create kind cluster
|
|
||||||
# uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
|
|
||||||
# with:
|
|
||||||
# node_image: kindest/node:${{ matrix.k8s }}
|
|
||||||
# version: ${{ env.KIND_VERSION }}
|
|
||||||
|
|
||||||
# - run: kubectl get no -o wide
|
|
||||||
|
|
||||||
# - name: Install chart-testing
|
|
||||||
# uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
|
||||||
# with:
|
|
||||||
# version: ${{ env.HELM_CHART_TESTING_VERSION }}
|
|
||||||
|
|
||||||
# # Catch-all required check for test matrix
|
# # Catch-all required check for test matrix
|
||||||
# test-success:
|
# test-success:
|
||||||
|
|
Loading…
Reference in a new issue