enable persistence on unifi #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
# schedule: | |
# - cron: '0 0 * * 3' | |
jobs: | |
deploy: | |
name: Verify a deployment | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install Microk8s | |
uses: balchua/[email protected] | |
with: | |
channel: '1.19/stable' | |
addons: '["storage", "dns", "rbac", "metrics-server"]' | |
- name: Fix kubectl permissions | |
run: | | |
set -eux | |
chmod 600 ~/.kube/config | |
- name: Install packages | |
run: | | |
set -eux | |
sudo snap install helm --classic | |
sudo apt update | |
sudo apt install tox -y | |
- name: Install Argocd CLI | |
run: | | |
set -eux | |
VERSION=$(curl --silent "https://api.github.com/repos/argoproj/argo-cd/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/') | |
sudo curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/$VERSION/argocd-linux-amd64 | |
sudo chmod +x /usr/local/bin/argocd | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Run pytest | |
# run: | | |
# tox -e serial -- ./tests/test_base.py | |
# tox -e serial -- ./tests/test_deploy.py::TestDeploy::test_organizr_install -s | |
# run: PYTEST_CLEAN_APPS=true tox -e serial -- -x | |
run: tox -e serial -- -n 2 -x | |
# run: tox -e serial -- ./tests/test_deploy.py::TestDeploy::test_minio_install -s | |
- name: Generate artifacts | |
run: | | |
.tox/env/bin/python3 ./tests/collect_artifacts.py | |
if: failure() | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: artifacts | |
path: ./artifacts | |
if: failure() | |
- name: Generate inspect tarball | |
run: > | |
sudo microk8s inspect | | |
grep -Po "Report tarball is at \K.+" | | |
sudo xargs -I {} mv {} inspection-report.tar.gz | |
if: failure() | |
- name: Upload inspect tarball | |
uses: actions/upload-artifact@v2 | |
with: | |
name: inspection-report-actions | |
path: ./inspection-report.tar.gz | |
if: failure() |