add function to create issue for expired flags #6
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, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linter | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm test | |
| - name: Validate build | |
| run: npm run build | |
| # Integration test (requires secrets - only run on main branch) | |
| integration-test: | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Test the action with issue creation | |
| uses: ./ | |
| with: | |
| launchdarkly_api_key: ${{ secrets.LAUNCHDARKLY_API_KEY }} | |
| project_key: ${{ vars.TEST_PROJECT_KEY || 'test-project' }} | |
| days_ahead: '30' | |
| include_past_due: 'true' | |
| create_issues: 'true' | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |