Install Test: master | fix(scheduler ): scheduler path and check (#550) by scriptxiaozi #1
This file contains hidden or 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: Test Install Script | |
| run-name: "Install Test: ${{ github.event_name == 'pull_request' && format('PR #{0}', github.event.pull_request.number) || github.ref_name }} | ${{ github.event.head_commit.message || github.event.pull_request.title || 'Manual trigger' }} by ${{ github.actor }}" | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| paths: | |
| - 'install.sh' | |
| - '.github/workflows/test-install.yml' | |
| jobs: | |
| test-install-script: | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| # Remote installer from the current repository and commit | |
| RAW_URL: ${{ format('https://raw.githubusercontent.com/{0}/{1}/install.sh', github.repository, github.sha) }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-13] | |
| steps: | |
| - name: Test install script help | |
| run: curl -fsSL "$RAW_URL" | sh -s -- --help | |
| - name: Test with bash (if available) | |
| run: curl -fsSL "$RAW_URL" | bash -s -- --help | |
| - name: Test install latest | |
| run: curl -fsSL "$RAW_URL" | sh | |
| - name: Check DDNS | |
| run: ddns --version | |
| - name: Test uninstall | |
| run: curl -fsSL "$RAW_URL" | sh -s -- --uninstall | |
| - name: Test install beta with language detection (zh_CN) | |
| run: curl -fsSL "$RAW_URL" | LANG=zh_CN.UTF-8 sh -s -- beta | |
| - name: Test install beta with language detection (zh_CN) | |
| run: curl -fsSL "$RAW_URL" | LANG=zh_CN.UTF-8 sh -s -- --help | grep -q "一键安装脚本" | |
| - name: Check DDNS | |
| run: ddns --version | |
| - name: Test uninstall | |
| run: curl -fsSL "$RAW_URL" | sh -s -- --uninstall | |
| - name: Test install location by wget | |
| run: wget -qO - "$RAW_URL" | sh -s -- --install-dir /tmp/ddns | |
| - name: Check DDNS in custom location | |
| run: /tmp/ddns/ddns --version | |
| test-with-container: | |
| name: Test on Container (${{ matrix.container }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| container: | |
| - alpine:latest | |
| - debian:latest | |
| - openwrt/rootfs:latest | |
| container: ${{ matrix.container }} | |
| env: | |
| # Remote installer from the current repository and commit | |
| RAW_URL: ${{ format('https://raw.githubusercontent.com/{0}/{1}/install.sh', github.repository, github.sha) }} | |
| steps: | |
| - name: install wget | |
| if: matrix.container == 'debian:latest' | |
| run: apt-get update && apt-get install -y wget | |
| - name: Download install script | |
| run: wget "$RAW_URL" && chmod +x install.sh | |
| - name: Test install script help | |
| run: ./install.sh --help | |
| - name: Test install latest | |
| run: ./install.sh | |
| - name: Check DDNS | |
| run: ddns --version | |
| - name: Test uninstall | |
| run: ./install.sh --uninstall | |
| - name: Test install beta with language detection (zh_CN) | |
| run: LANG=zh_CN.UTF-8 ./install.sh beta | |
| - name: Check DDNS | |
| run: ddns --version | |
| - name: Test uninstall | |
| run: ./install.sh --uninstall |