|
| 1 | +name: Integration Tests For Retina |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | +jobs: |
| 5 | + integ-test: |
| 6 | + runs-on: ubuntu-latest |
| 7 | + steps: |
| 8 | + - name: Free up disk space |
| 9 | + run: | |
| 10 | + # https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 |
| 11 | + # du -sh /* 2> /dev/null | sort -rh 2> /dev/null | head |
| 12 | + # du -h -d2 /usr 2> /dev/null | sort -rh 2> /dev/null | head |
| 13 | + echo "Check free disk space before cleanup." |
| 14 | + df -h |
| 15 | + echo "Removing non-essential tools and libraries." |
| 16 | + sudo rm -rf "$AGENT_TOOLSDIRECTORY" |
| 17 | + sudo rm -rf /opt/ghc |
| 18 | + sudo rm -rf /usr/share/dotnet |
| 19 | + sudo rm -rf /usr/local/share/boost |
| 20 | + # delete libraries for Android (12G), PowerShell (1.3G), Swift (1.7G) |
| 21 | + sudo rm -rf /usr/local/lib/android |
| 22 | + sudo rm -rf /usr/local/share/powershell |
| 23 | + sudo rm -rf /usr/share/swift |
| 24 | + echo "Check free disk space after cleanup." |
| 25 | + df -h |
| 26 | +
|
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@v3 |
| 29 | + |
| 30 | + - uses: actions/setup-go@v2 |
| 31 | + with: |
| 32 | + go-version: "^1.18" |
| 33 | + |
| 34 | + - name: Make retina image |
| 35 | + run: | |
| 36 | + export CONTAINER_BUILDER=docker |
| 37 | + export CONTAINER_RUNTIME=docker |
| 38 | + make all-images-local |
| 39 | + make install-kubectl-retina |
| 40 | + make base-images-remove |
| 41 | + curl -LO https://github.com/kvaps/kubectl-node-shell/raw/master/kubectl-node_shell |
| 42 | + chmod +x ./kubectl-node_shell |
| 43 | + sudo mv ./kubectl-node_shell /usr/local/bin/kubectl-node_shell |
| 44 | + docker system prune -f |
| 45 | +
|
| 46 | + - name: Deploy Kind |
| 47 | + run: make kind-setup |
| 48 | + |
| 49 | + - name: Install retina |
| 50 | + run: make kind-install |
| 51 | + |
| 52 | + - name: Run tests |
| 53 | + run: make retina-integration |
| 54 | + |
| 55 | + - name: Export Kubernetes logs |
| 56 | + if: failure() |
| 57 | + run: make retina-export-logs |
| 58 | + |
| 59 | + - name: Archive Kubernetes logs |
| 60 | + if: failure() |
| 61 | + uses: actions/upload-artifact@v3 |
| 62 | + with: |
| 63 | + name: kubernetes-node-logs |
| 64 | + path: kubernetes-logs |
| 65 | + |
| 66 | + - name: Archive iptable and ipset |
| 67 | + if: failure() |
| 68 | + uses: actions/upload-artifact@v3 |
| 69 | + with: |
| 70 | + name: iptable-ipset-snapshot |
| 71 | + path: ./test/integration/plugin-simulations/npm-iptables |
| 72 | + - name: Cleanup |
| 73 | + if: always() |
| 74 | + run: make kind-clean |
0 commit comments