feat: 国内软件扩展(5个新软件 + 1个新套餐) #42
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: Quality | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| shellcheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run ShellCheck | |
| uses: ludeeus/action-shellcheck@master | |
| with: | |
| check_together: 'yes' | |
| scandir: './src' | |
| severity: error | |
| pwsh-syntax: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install PowerShell | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y wget apt-transport-https software-properties-common | |
| wget -q "https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell_7.4.1-1.deb_amd64.deb" | |
| sudo dpkg -i powershell_7.4.1-1.deb_amd64.deb || sudo apt-get install -f -y | |
| - name: Check PowerShell syntax | |
| run: | | |
| pwsh -NoProfile -Command ' | |
| $errors = @() | |
| $tokens = @() | |
| [System.Management.Automation.Language.Parser]::ParseFile("src/quickstart.ps1", [ref]$tokens, [ref]$errors) | |
| if ($errors.Count -gt 0) { | |
| $errors | ForEach-Object { Write-Error $_.ToString() } | |
| exit 1 | |
| } | |
| Write-Host "PowerShell syntax OK" | |
| ' | |
| json-validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate profiles.json | |
| run: | | |
| python3 -c "import json; json.load(open('config/profiles.json'))" | |
| echo "✓ profiles.json is valid JSON" | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build dist | |
| run: bash scripts/build.sh | |
| - name: Verify dist files exist | |
| run: | | |
| test -f dist/quickstart.sh | |
| test -f dist/quickstart.ps1 | |
| echo "✓ Both dist files built successfully" | |
| smoke-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install jq | |
| run: sudo apt-get update && sudo apt-get install -y jq | |
| - name: Build | |
| run: bash scripts/build.sh | |
| - name: Test --help | |
| run: bash dist/quickstart.sh --help 2>&1 | grep -q "Quickstart-PC" | |
| - name: Test --list-profiles | |
| run: | | |
| output=$(bash dist/quickstart.sh --list-profiles --cfg-path config/profiles.json 2>&1) | |
| echo "$output" | |
| echo "$output" | grep -q "Available profiles" | |
| - name: Test --show-profile | |
| run: | | |
| output=$(bash dist/quickstart.sh --show-profile developer --cfg-path config/profiles.json 2>&1 || true) | |
| echo "$output" | |
| echo "$output" | grep -q "Profile:" | |
| - name: Test --profile --dry-run --yes | |
| run: | | |
| output=$(bash dist/quickstart.sh --profile developer --dry-run --yes --lang en --non-interactive --cfg-path config/profiles.json 2>&1) | |
| echo "$output" | |
| echo "$output" | grep -q "Selected:" | |
| - name: Test --profile --only --dry-run --yes | |
| run: | | |
| output=$(bash dist/quickstart.sh --profile developer --only git --dry-run --yes --lang en --non-interactive --cfg-path config/profiles.json 2>&1) | |
| echo "$output" | |
| echo "$output" | grep -q "Selected: git" | |
| - name: Test --profile --skip --dry-run --yes | |
| run: | | |
| output=$(bash dist/quickstart.sh --profile developer --skip docker --dry-run --yes --lang en --non-interactive --cfg-path config/profiles.json 2>&1) | |
| echo "$output" | |
| echo "$output" | grep -q "Selected:" |