-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ci): Add CI checks for config validation, migrations, and collectors #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c160cc2
feat(ci): add CI checks for config validation, migrations, and collec…
kumanday a25499f
fix(ci): use Makefile targets in CI workflow and add EOF newline
kumanday b59d20d
Strengthen collector validation tests
kumanday cc29d58
fix: resolve config validation and import ordering issues
kumanday 4c99dd3
Merge remote-tracking branch 'origin/main' into coe-319-ci-checks
kumanday aa8e6b8
fix(deps): add missing requests dependency
kumanday 4309c71
fix: resolve lint errors across codebase
kumanday 98b3f47
test: improve collector validation tests - replace tautological asser…
kumanday d1f889e
style: fix formatting in migrations, scripts, and test files
kumanday 44a5a8c
fix(types): add type ignore comments for requests stubs and session a…
kumanday 41a42a1
fix(types): resolve remaining type errors in src/
kumanday 99e5ad9
fix(ci): make quality checks pass on benchmark services and collectors
kumanday 5e311ee
chore: remove requests
kumanday File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,203 @@ | ||
| name: ci | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install --system -e ".[dev]" | ||
|
|
||
| - name: Run linter | ||
| run: make lint | ||
|
|
||
| format-check: | ||
| name: Format Check | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install --system -e ".[dev]" | ||
|
|
||
| - name: Check formatting | ||
| run: make format-check | ||
|
|
||
| type-check: | ||
| name: Type Check | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install --system -e ".[dev]" | ||
|
|
||
| - name: Run type checker | ||
| run: make type-check | ||
|
|
||
| test: | ||
| name: Test | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install --system -e ".[dev]" | ||
|
|
||
| - name: Run tests | ||
| run: make test | ||
|
|
||
| config-validation: | ||
| name: Config Validation | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install --system -e ".[dev]" | ||
|
|
||
| - name: Run config validation tests | ||
| run: make validate-config | ||
|
|
||
| migration-check: | ||
| name: Migration Check | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install --system -e ".[dev]" | ||
|
|
||
| - name: Run migration tests | ||
| run: make validate-migrations | ||
|
|
||
| collector-check: | ||
| name: Collector Check | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install --system -e ".[dev]" | ||
|
|
||
| - name: Run collector tests | ||
| run: make validate-collectors | ||
|
|
||
| quality: | ||
| name: Quality Gate | ||
| runs-on: ubuntu-24.04 | ||
| needs: [lint, format-check, type-check, test, config-validation, migration-check, collector-check] | ||
| if: always() | ||
| steps: | ||
| - name: Check all jobs passed | ||
| run: | | ||
| if [[ "${{ needs.lint.result }}" != "success" || \ | ||
| "${{ needs.format-check.result }}" != "success" || \ | ||
| "${{ needs.type-check.result }}" != "success" || \ | ||
| "${{ needs.test.result }}" != "success" || \ | ||
| "${{ needs.config-validation.result }}" != "success" || \ | ||
| "${{ needs.migration-check.result }}" != "success" || \ | ||
| "${{ needs.collector-check.result }}" != "success" ]]; then | ||
| echo "::error::One or more quality checks failed" | ||
| exit 1 | ||
| fi | ||
| echo "✓ All quality checks passed" | ||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.