feat: add install-dir input for custom installation directory #16
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 Action | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| # Test 1: Basic install + init (no source) | |
| basic: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./ | |
| - run: ./scripts/test.sh | |
| # Test 2: Team skills repo as source → sync to claude | |
| with-source: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: runkids/my-skills | |
| path: my-skills | |
| - run: mkdir -p ~/.claude/skills | |
| - uses: ./ | |
| with: | |
| source: ./my-skills | |
| targets: claude | |
| - run: skillshare sync | |
| - run: skillshare list --json | jq -e 'length > 0' | |
| # Test 3: Install tracked repo from GitHub | |
| with-install: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: mkdir -p ~/.claude/skills | |
| - uses: ./ | |
| with: | |
| targets: claude | |
| - run: skillshare install runkids/my-skills --track | |
| - run: skillshare sync | |
| - run: skillshare list --json | jq -e 'length > 0' | |
| # Test 4: Specific targets + copy mode | |
| with-targets: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: mkdir -p ~/.claude/skills | |
| - uses: ./ | |
| with: | |
| targets: claude | |
| mode: copy | |
| - run: grep -q "claude" ~/.config/skillshare/config.yaml | |
| # Test 5: With git enabled | |
| with-git: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./ | |
| with: | |
| git: true | |
| - run: test -d ~/.config/skillshare/skills/.git | |
| # Test 6: Git remote → auto-pull skills → sync | |
| with-remote: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: mkdir -p ~/.claude/skills | |
| - uses: ./ | |
| with: | |
| remote: https://github.com/runkids/my-skills.git | |
| targets: claude | |
| - run: skillshare sync | |
| - run: skillshare list --json | jq -e 'length > 0' | |
| # Test 7: Pinned version | |
| pinned-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./ | |
| with: | |
| version: "0.18.3" | |
| - run: skillshare version | grep "0.18.3" | |
| # Test 8: Security audit | |
| with-audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: runkids/my-skills | |
| path: my-skills | |
| - uses: ./ | |
| with: | |
| source: ./my-skills | |
| audit: true | |
| audit-threshold: critical | |
| audit-format: json | |
| audit-output: audit-results.json | |
| - run: test -f audit-results.json | |
| - run: cat audit-results.json | jq -e '.summary' | |
| # Test 9: Audit with SARIF output | |
| with-audit-sarif: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: runkids/my-skills | |
| path: my-skills | |
| - uses: ./ | |
| with: | |
| source: ./my-skills | |
| audit: true | |
| audit-format: sarif | |
| audit-output: skillshare-audit.sarif | |
| - run: test -f skillshare-audit.sarif | |
| - run: cat skillshare-audit.sarif | jq -e '.runs' | |
| # Test 10: Project mode | |
| with-project: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| mkdir -p .skillshare/skills/test-skill | |
| echo -e "---\nname: test-skill\n---\n# Test" > .skillshare/skills/test-skill/SKILL.md | |
| - run: mkdir -p .claude/skills | |
| - uses: ./ | |
| with: | |
| project: true | |
| targets: claude | |
| - run: test -f .skillshare/config.yaml | |
| # Test 11: Outputs | |
| with-outputs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./ | |
| id: skillshare | |
| - run: | | |
| VERSION="${{ steps.skillshare.outputs.version }}" | |
| if [ -z "$VERSION" ]; then | |
| echo "::error::version output is empty" | |
| exit 1 | |
| fi | |
| echo "Installed version: $VERSION" | |
| # Test 12: Same-run cache (binary already in RUNNER_TOOL_CACHE) | |
| with-cache: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./ | |
| - name: Verify binary is cached | |
| run: | | |
| VERSION=$(skillshare version 2>&1 | grep -oP '\d+\.\d+\.\d+' | head -1) | |
| test -x "$RUNNER_TOOL_CACHE/skillshare/${VERSION}/skillshare" | |
| echo "Binary cached at $RUNNER_TOOL_CACHE/skillshare/${VERSION}/skillshare" |