This repository was archived by the owner on Sep 21, 2023. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork4
ci(python): run lint / unit tests / docs as GH actions#126
Merged
parthea merged 2 commits intomainfromowl-bot-update-lock-ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6Jan 20, 2022
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
16 changes: 15 additions & 1 deletion.github/.OwlBot.lock.yaml
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 |
|---|---|---|
| @@ -1,3 +1,17 @@ | ||
| # Copyright 2022 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| docker: | ||
| image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest | ||
| digest: sha256:ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6 | ||
38 changes: 38 additions & 0 deletions.github/workflows/docs.yml
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,38 @@ | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| name: docs | ||
| jobs: | ||
| docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Install nox | ||
| run: | | ||
| python -m pip install --upgrade setuptools pip wheel | ||
| python -m pip install nox | ||
| - name: Run docs | ||
| run: | | ||
| nox -s docs | ||
| docfx: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Install nox | ||
| run: | | ||
| python -m pip install --upgrade setuptools pip wheel | ||
| python -m pip install nox | ||
| - name: Run docfx | ||
| run: | | ||
| nox -s docfx |
25 changes: 25 additions & 0 deletions.github/workflows/lint.yml
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,25 @@ | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| name: lint | ||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Install nox | ||
| run: | | ||
| python -m pip install --upgrade setuptools pip wheel | ||
| python -m pip install nox | ||
| - name: Run lint | ||
| run: | | ||
| nox -s lint | ||
| - name: Run lint_setup_py | ||
| run: | | ||
| nox -s lint_setup_py |
57 changes: 57 additions & 0 deletions.github/workflows/unittest.yml
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,57 @@ | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| name: unittest | ||
| jobs: | ||
| unit: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python: ['3.6', '3.7', '3.8', '3.9', '3.10'] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
| - name: Install nox | ||
| run: | | ||
| python -m pip install --upgrade setuptools pip wheel | ||
| python -m pip install nox | ||
| - name: Run unit tests | ||
| env: | ||
| COVERAGE_FILE: .coverage-${{ matrix.python }} | ||
| run: | | ||
| nox -s unit-${{ matrix.python }} | ||
| - name: Upload coverage results | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: coverage-artifacts | ||
| path: .coverage-${{ matrix.python }} | ||
| cover: | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - unit | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Install coverage | ||
| run: | | ||
| python -m pip install --upgrade setuptools pip wheel | ||
| python -m pip install coverage | ||
| - name: Download coverage results | ||
| uses: actions/download-artifact@v2 | ||
| with: | ||
| name: coverage-artifacts | ||
| path: .coverage-results/ | ||
| - name: Report coverage results | ||
| run: | | ||
| coverage combine .coverage-results/.coverage* | ||
| coverage report --show-missing --fail-under=100 |
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.