Explore FTP client interface with Flutter #58
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: Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install Node dependencies | |
| run: npm install | |
| - name: Check Node syntax | |
| run: node --check src/index.js | |
| - name: Check SSH Manager syntax | |
| run: node --check src/ssh-manager.js | |
| - name: Create test .env file | |
| run: | | |
| echo "SSH_SERVER_TEST_HOST=localhost" > .env | |
| echo "SSH_SERVER_TEST_USER=test" >> .env | |
| echo "SSH_SERVER_TEST_PASSWORD=test" >> .env | |
| echo "SSH_SERVER_TEST_PORT=22" >> .env | |
| - name: Run JavaScript tests | |
| run: npm test | |
| - name: Run validation script | |
| run: ./scripts/validate.sh | |
| - name: Validate profile JSON files | |
| run: | | |
| for file in profiles/*.json; do | |
| python -m json.tool "$file" > /dev/null | |
| done | |
| - name: Test profile system | |
| run: node tests/test-profiles.js | |
| - name: Test command aliases | |
| run: node tests/test-command-aliases.js | |
| - name: Test hooks system | |
| run: node tests/test-hooks.js | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Check for secrets | |
| run: | | |
| # Basic check for common secret patterns | |
| ! grep -r "password\|secret\|token\|api_key" .env 2>/dev/null || true | |
| ! git ls-files | xargs grep -E "(password|secret|token|api_key)\s*=\s*['\"]" 2>/dev/null || true |