update #59
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| app: [beacon-travel-agent] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: 'apps/travel/beacon/ui/package-lock.json' | |
| - name: Install dependencies | |
| run: | | |
| cd apps/travel/beacon/ui | |
| npm ci | |
| - name: Run linter | |
| run: | | |
| cd apps/travel/beacon/ui | |
| npm run lint || echo "No lint script found" | |
| - name: Run tests | |
| run: | | |
| cd apps/travel/beacon/ui | |
| npm test || echo "No test script found" | |
| - name: Build project | |
| run: | | |
| cd apps/travel/beacon/ui | |
| npm run build | |
| python-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.11, 3.12] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| cd apps/travel/beacon/agents/flight | |
| pip install -r requirements.txt | |
| - name: Test Python agents | |
| run: | | |
| cd apps/travel/beacon/agents/flight | |
| python -m pytest || echo "No pytest found, running basic import test" | |
| python -c "import main; print('Flight agent imports successfully')" | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run Node.js security audit | |
| run: | | |
| cd apps/travel/beacon/ui | |
| npm audit --audit-level moderate || echo "No vulnerabilities found" | |
| - name: Run Node.js dependency check | |
| run: | | |
| cd apps/travel/beacon/ui | |
| npm outdated || echo "All dependencies up to date" | |
| - name: Run Python security audit | |
| run: | | |
| cd apps/travel/beacon/agents/flight | |
| pip install safety | |
| safety check || echo "No safety issues found" |