2023-04-14 15:21:00 -05:00
|
|
|
name: check-and-test
|
|
|
|
|
|
|
|
on:
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-and-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-24 22:41:55 -05:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-14 15:21:00 -05:00
|
|
|
- name: install tools
|
|
|
|
run: |
|
|
|
|
apt update -y
|
|
|
|
apt install -y curl make
|
2023-10-10 14:48:00 -05:00
|
|
|
# helm
|
2023-04-14 15:21:00 -05:00
|
|
|
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null
|
|
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list
|
2023-10-10 14:48:00 -05:00
|
|
|
# docker
|
|
|
|
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
|
2023-04-14 15:21:00 -05:00
|
|
|
apt update -y
|
2023-10-10 14:48:00 -05:00
|
|
|
apt install -y helm python3-pip docker-ce-cli
|
2023-04-14 15:21:00 -05:00
|
|
|
pip install yamllint
|
2023-10-10 14:48:00 -05:00
|
|
|
# login to docker
|
|
|
|
echo ${{ secrets.DOCKER_PASSWORD_PUBLIC }} | docker login -u ${{ secrets.DOCKER_USERNAME_PUBLIC }} --password-stdin
|
2023-04-14 15:21:00 -05:00
|
|
|
- name: dependency update
|
|
|
|
run: helm dependency update
|
|
|
|
- name: lint
|
|
|
|
run: helm lint
|
|
|
|
- name: template
|
|
|
|
run: |
|
|
|
|
helm template --debug gitea-helm .
|
|
|
|
- name: unit tests
|
|
|
|
run: |
|
2023-05-31 03:47:58 -05:00
|
|
|
helm plugin install --version 0.3.3 https://github.com/helm-unittest/helm-unittest
|
2023-04-14 15:21:00 -05: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
|