|
| 1 | +name: Run fuzzy tests - neptune-query |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 8 * * *' # Run at 8:00 daily |
| 6 | + workflow_dispatch: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + - dev/.* |
| 11 | + pull_request: |
| 12 | + paths: |
| 13 | + - 'src/**' |
| 14 | + - 'tests/fuzzy/**' |
| 15 | + - 'dev_requirements.txt' |
| 16 | + - 'pyproject.toml' |
| 17 | + - '.github/workflows/tests-fuzzy.yml' |
| 18 | + |
| 19 | +jobs: |
| 20 | + test: |
| 21 | + timeout-minutes: 75 |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + python-version: [ "3.13" ] |
| 26 | + os: [ ubuntu ] |
| 27 | + |
| 28 | + name: 'fuzzy test (${{ matrix.os }} - py${{ matrix.python-version }})' |
| 29 | + runs-on: ${{ matrix.os }}-latest |
| 30 | + steps: |
| 31 | + - name: Checkout repository |
| 32 | + uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + fetch-depth: 0 |
| 35 | + ref: ${{ github.event.client_payload.pull_request.head.ref }} |
| 36 | + |
| 37 | + - name: Install package |
| 38 | + uses: ./.github/actions/install-package |
| 39 | + with: |
| 40 | + python-version: ${{ matrix.python-version }} |
| 41 | + os: ${{ matrix.os }}-latest |
| 42 | + |
| 43 | + - name: Run tests |
| 44 | + uses: ./.github/actions/run-tests |
| 45 | + with: |
| 46 | + test-directory: fuzzy |
| 47 | + report-job: 'test fuzzy (${{ matrix.os }} - py${{ matrix.python-version }})' |
| 48 | + report-suffix: 'fuzzy-${{ matrix.python-version }}-${{ matrix.os }}' |
| 49 | + timeout: "900" |
| 50 | + env: |
| 51 | + NEPTUNE_E2E_HYPOTHESIS_PROFILE: ${{ github.event_name == 'schedule' && 'ci-nightly' || 'ci-quick' }} |
| 52 | + |
| 53 | + - name: Notify Slack on failure |
| 54 | + if: failure() && github.event_name == 'schedule' |
| 55 | + uses: actions/github-script@v7 |
| 56 | + with: |
| 57 | + script: | |
| 58 | + const webhookUrl = process.env.SLACK_WEBHOOK_URL; |
| 59 | + const payload = { |
| 60 | + username: "GitHub Actions", |
| 61 | + text: `Fuzzy tests failed in the repository: <https://github.com/${context.repo.owner}/${context.repo.repo}|${context.repo.owner}/${context.repo.repo}>. Please check the details.` |
| 62 | + }; |
| 63 | + await fetch(webhookUrl, { |
| 64 | + method: 'POST', |
| 65 | + headers: { |
| 66 | + 'Content-Type': 'application/json' |
| 67 | + }, |
| 68 | + body: JSON.stringify(payload) |
| 69 | + }); |
| 70 | + env: |
| 71 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
0 commit comments