ci: more testing

This commit is contained in:
Michael Kriese 2023-12-07 15:23:25 +01:00
parent 1fa3e287b0
commit da9ef9585a
No known key found for this signature in database
GPG key ID: B83F553A0724D44E
3 changed files with 31 additions and 25 deletions

View file

@ -0,0 +1,23 @@
# action.yml
name: setup-docker
description: 'setup docker'
runs:
using: 'composite'
steps:
- shell: bash
name: create cache
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 \
containerd.io \
docker-ce \
docker-ce-cli \
;

View file

@ -9,6 +9,7 @@ runs:
name: create cache name: create cache
run: | run: |
mkdir -p /opt/hostedtoolcache mkdir -p /opt/hostedtoolcache
mkdir -p /srv/forgejo-renovate/.cache/act/tool_cache
- shell: bash - shell: bash
name: install deps name: install deps
run: | run: |

View file

@ -73,7 +73,7 @@ jobs:
# - run: ct lint --config tools/ct.yml --charts . # - run: ct lint --config tools/ct.yml --charts .
e2e: e2e:
runs-on: docker runs-on: self-hosted
strategy: strategy:
matrix: matrix:
@ -93,31 +93,12 @@ 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 # TODO: pin to version when this is released: https://github.com/helm/chart-testing-action/pull/137
uses: helm/chart-testing-action@86b540ddcecb3cc009fa2bc0f44fa5b33e9751a2 # main
with: with:
version: ${{ env.HELM_CHART_TESTING_VERSION }} version: ${{ env.HELM_CHART_TESTING_VERSION }}
- name: install docker - uses: ./.forgejo/actions/setup-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-cli \
;
# - 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 }} # - name: install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
# run: | # run: |
@ -132,8 +113,6 @@ jobs:
- run: docker ps - run: docker ps
- run: env
- name: Create kind cluster - name: Create kind cluster
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
with: with:
@ -142,6 +121,9 @@ jobs:
- run: kubectl get no -o wide - run: kubectl get no -o wide
- name: install chart
run: ct install --config tools/ct.yml --charts .
# # Catch-all required check for test matrix # # Catch-all required check for test matrix
# test-success: # test-success:
# needs: # needs: