10.03 — ocarina-example workflows#

See also ../07-ocarina-example/11-ci.md

Overview#

WorkflowTriggerOSEffectNote
main_ci.ymlpush/PR main, dispatchubuntu + windows × py 3.14make check-coding-style (mypy + ruff).Fast PR gate
dev_ci.ymlpush dev, dispatchubuntu × py 3.14SameFor dev branches
e2e.ymlworkflow_dispatch (env OC)ubuntu + Redis service + Firefox + geckodriver 0.35.0Full suite run + upload .screenshots/ .ocarina_logs/ .reports/Manual only

vs ocarina/main_ci.yml#

Aspectocarina/main_ci.ymlocarina-example/main_ci.yml
Unit testsYes (pytest + cram)No
Allure historyYesNo
GitHub Pages deployYes (Allure report)No
OS matrixYes (ubuntu + windows)Yes (same)
Python matrixOptional (3.14 or 3.14+3.15)No (3.14 only)

ocarina tests itself (unit tests) in CI. ocarina-example only runs static checks in CI; its e2e tests are fired on demand via e2e.yml.

The Redis sidecar service#

services:
  redis:
    image: redis:8.8.0
    ports: [6379:6379]
    options: >-
      --health-cmd "redis-cli ping"
      --health-interval 10s
      --health-timeout 5s
      --health-retries 5

GitHub Actions “spins up” a Redis container alongside the job. Reachable on localhost:6379. Healthcheck via redis-cli ping.

Tests can then use Redis for distributed locks (OTP_SEND_LOCK_KEY) without provisioning an external Redis.

environment: OC#

e2e:
  runs-on: ubuntu-latest
  environment: OC
  • Holds the secrets: IGOR_API_KEY, DASH_USERNAME, DASH_PASSWORD.
  • Can require manual approval before running (useful when consuming quota).

The user dispatching the workflow must have access to the OC environment.

Artifacts#

- name: Upload artifacts
  if: always()
  uses: actions/upload-artifact@v4
  with:
    name: e2e-traces
    path: |
      .screenshots/
      .ocarina_logs/
      .reports/

if: always(): upload even if the run failed. So you can inspect why it failed.

  1. .screenshots/: all screenshots.
  2. .ocarina_logs/: cycle/campaign/suite/test.log log tree.
  3. .reports/: plugin outputs (DOCX + JSON).

venv cache hashed on pyproject#

- uses: actions/cache@v5
  with:
    path: .venv
    key: venv-${{ runner.os }}-py-${{ hashFiles('pyproject.toml') }}

hashFiles('pyproject.toml'): if pyproject.toml changes (new dep, bumped version), the cache key changes → cache miss → clean reinstall.

Setup Firefox#

- name: Setup Firefox
  uses: browser-actions/setup-firefox@<commit-sha>

Public action that installs the Firefox version matching the downloaded geckodriver.

Version pinning by SHA is used everywhere for all non-official actions (not prefixed with actions/) to mitigate Supply Chain Attack risks.