feat:刷S/SS+ #166
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: check | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| paths: | |
| - ".github/workflows/check.yml" | |
| - "assets/**" | |
| - "**.py" | |
| pull_request: | |
| branches: | |
| - "**" | |
| paths: | |
| - ".github/workflows/check.yml" | |
| - "assets/**" | |
| - "**.py" | |
| workflow_dispatch: | |
| jobs: | |
| resource: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Use Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Run maa-checker | |
| run: | | |
| npx @nekosu/maa-checker@latest ./assets/interface.json --github=. | |
| - name: Install maafw | |
| run: | | |
| python -m pip install --upgrade pip | |
| # 从 requirements.txt 自动解析 maafw 版本,避免固定 --pre 带来不稳定 | |
| pkg=$(grep -E '^\s*maafw' requirements.txt | head -1 | tr -d '[:space:]') | |
| if [ -z "$pkg" ]; then | |
| pkg='maafw' | |
| fi | |
| echo "Installing $pkg" | |
| python -m pip install --upgrade "$pkg" | |
| - name: Check Resource | |
| run: | | |
| python ./tools/ci/check_resource.py ./assets/resource/ | |
| - name: Validate JSON Schema | |
| run: | | |
| python -m pip install jsonschema==4.26.0 referencing==0.37.0 | |
| python tools/validate_schema.py --schema-dir deps/tools --resource-dirs assets/resource --exclude-dirs assets/resource/announcement assets/resource/data assets/resource/tasks --interface-files assets/interface.json --task-dirs assets/resource/tasks |