Skip to content

Commit

Permalink
Test trunk-io services (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet authored Apr 15, 2024
1 parent c0bba97 commit 9f55b76
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ site
coverage.xml
config.yaml*
.env
.reports
9 changes: 9 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
env:
REDIS_OM_URL: redis://localhost:6379/0
GITHUB_BASE_URL: http://localhost:4010
TRUNK_TOKEN: ${{ secrets.TRUNK_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Boot compose services
Expand All @@ -48,6 +49,14 @@ jobs:
name: ${{ matrix.test.name }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload results
if: "!cancelled() && env.TRUNK_TOKEN"
uses: trunk-io/analytics-uploader@main
with:
junit-paths: .reports/*.xml
org-slug: ${{ github.repository_owner }}
token: ${{ env.TRUNK_TOKEN }}
continue-on-error: true
- name: Dump logs
run: docker compose --profile tests logs
if: always()
10 changes: 9 additions & 1 deletion .github/workflows/trunk-check.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
name: Trunk Check

on: [pull_request]
on:
pull_request:
branches:
- main
push:
branches:
- main

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand All @@ -27,3 +33,5 @@ jobs:
- run: poetry install
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ site
coverage.xml
config.yaml
.env
.reports
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
addopts = "--disable-warnings --cov=runner_manager --cov-report=xml"
addopts = "--disable-warnings --cov=runner_manager --cov-report=xml --junitxml=.reports/junit.xml"

# Add poetry scripts
[tool.poetry.scripts]
Expand Down

0 comments on commit 9f55b76

Please sign in to comment.