|
| 1 | +name: sanity-test-prod |
| 2 | + |
| 3 | +concurrency: |
| 4 | + group: sanity-test-prod |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +on: |
| 8 | + # run this workflow manually from the Actions tab |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read # required for actions checkout |
| 13 | + |
| 14 | +jobs: |
| 15 | + prod-sanity-test: |
| 16 | + name: prod-sanity-test |
| 17 | + # github actions ubuntu runners have known intermittent network timeout / connection issues |
| 18 | + # (i.e. https://github.com/actions/runner-images/issues/11886) that cause the integration tests |
| 19 | + # to fail with intermittent connection reset issues; so we use macos runners instead |
| 20 | + runs-on: macos-latest |
| 21 | + environment: |
| 22 | + name: production |
| 23 | + deployment: false |
| 24 | + env: |
| 25 | + IS_CI_AUTOMATION: "yes" |
| 26 | + TEST_SERVER_HOST: ${{ secrets.TEST_SERVER_HOST }} |
| 27 | + TEST_ACCT_1_USERNAME: ${{ secrets.TEST_ACCT_1_USERNAME }} |
| 28 | + TEST_ACCT_1_PASSWORD: ${{ secrets.TEST_ACCT_1_PASSWORD }} |
| 29 | + TEST_ACCT_1_EMAIL: ${{ secrets.TEST_ACCT_1_EMAIL }} |
| 30 | + TEST_ACCT_2_USERNAME: ${{ secrets.TEST_ACCT_2_USERNAME }} |
| 31 | + TEST_ACCT_2_PASSWORD: ${{ secrets.TEST_ACCT_2_PASSWORD }} |
| 32 | + TEST_ACCT_2_EMAIL: ${{ secrets.TEST_ACCT_2_EMAIL }} |
| 33 | + |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v5 |
| 36 | + |
| 37 | + - name: Set up Python |
| 38 | + uses: actions/setup-python@v6 |
| 39 | + with: |
| 40 | + python-version: '3.13.0' |
| 41 | + |
| 42 | + - name: Install test dependencies |
| 43 | + run: | |
| 44 | + python -m venv .venv |
| 45 | + source .venv/bin/activate |
| 46 | + python -m pip install --upgrade pip |
| 47 | + pip install ."[dev]" |
| 48 | +
|
| 49 | + - name: Run sanity test on production |
| 50 | + continue-on-error: true # we want all tests to run even if these or others fail |
| 51 | + run: | |
| 52 | + source .venv/bin/activate |
| 53 | + cd test/integration |
| 54 | + cp .env.test.example .env.test |
| 55 | + python -m pytest -m sanity --junit-xml=./sanity-test-results.xml -vs |
| 56 | +
|
| 57 | + - name: Create results report |
| 58 | + continue-on-error: true # we always want this step to run |
| 59 | + if: always() |
| 60 | + uses: pmeier/pytest-results-action@main |
| 61 | + with: |
| 62 | + path: test/integration/*test-results.xml |
| 63 | + summary: true |
| 64 | + fail-on-empty: false |
| 65 | + title: Production Sanity Test Results |
0 commit comments