Bump crowdstrike-foundry-function from 1.1.3 to 1.1.4 in /functions/h… #547
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: Sample CI | |
| on: [ push, pull_request ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-functions: | |
| strategy: | |
| matrix: | |
| function: | |
| - hello | |
| - host-details | |
| - log-event | |
| - servicenow | |
| - host-info | |
| - user-management | |
| name: Test ${{ matrix.function }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| cache-dependency-path: 'functions/${{ matrix.function }}/requirements.txt' | |
| - name: Install Python dependencies | |
| run: pip install -r requirements.txt | |
| working-directory: functions/${{ matrix.function }} | |
| - name: Run tests if test_main.py exists | |
| run: | | |
| if [ -f "test_main.py" ]; then | |
| echo "Running tests with test_main.py" | |
| pytest | |
| else | |
| echo "No test_main.py found, skipping tests" | |
| fi | |
| working-directory: functions/${{ matrix.function }} | |
| - name: Verify function starts | |
| run: | | |
| timeout 30s bash -c ' | |
| python main.py > output.log 2>&1 & | |
| PID=$! | |
| while ! grep -q "running at port 8081" output.log 2>/dev/null; do | |
| sleep 1 | |
| done | |
| echo "✅ Application started successfully" | |
| kill $PID 2>/dev/null || true | |
| ' || { | |
| echo "❌ Application failed to start" | |
| cat output.log 2>/dev/null || echo "No output log found" | |
| exit 1 | |
| } | |
| working-directory: functions/${{ matrix.function }} | |
| build-ui: | |
| name: Build UI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Node | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| cache-dependency-path: 'ui/extensions/hello/package-lock.json' | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: ui/extensions/hello | |
| - name: Build React app | |
| run: npm run build | |
| working-directory: ui/extensions/hello | |
| - name: Test React app | |
| run: npm test | |
| working-directory: ui/extensions/hello |