Test trunk-io services #1090
Workflow file for this run
This file contains 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: tests | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
jobs: | ||
test: | ||
name: ${{ matrix.test.name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
test: | ||
- name: unit | ||
path: tests/unit | ||
- name: api | ||
path: tests/api | ||
env: | ||
REDIS_OM_URL: redis://localhost:6379/0 | ||
GITHUB_BASE_URL: http://localhost:4010 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Boot compose services | ||
run: docker compose --profile tests up --build --detach | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
cache: poetry | ||
- run: poetry install | ||
- name: Run tests | ||
uses: trunk-io/breakpoint@v1 | ||
with: | ||
breakpoint-id: runner-manager-test | ||
run: poetry run pytest ${{ matrix.test.path }} | ||
trunk-token: ${{ secrets.TRUNK_TOKEN }} | ||
org: scality | ||
env: | ||
GITHUB_TOKEN: test | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
flags: ${{ matrix.test.name }} | ||
name: ${{ matrix.test.name }} | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Upload results | ||
if: !cancelled() | ||
uses: trunk-io/analytics-uploader@main | ||
with: | ||
junit-paths: .results/*.xml | ||
org-slug: scality | ||
token: ${{ secrets.TRUNK_TOKEN }} | ||
continue-on-error: true | ||
- name: Dump logs | ||
run: docker compose --profile tests logs | ||
if: always() |