Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4eb6e01

Browse filesBrowse files
ci(python): run lint / unit tests / docs as GH actions (#75)
* ci(python): run lint / unit tests / docs as GH actions Source-Link: googleapis/synthtool@57be0cd Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6 * add commit to trigger gh action Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 6ca0c75 commit 4eb6e01
Copy full SHA for 4eb6e01

File tree

Expand file treeCollapse file tree

4 files changed

+135
-1
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+135
-1
lines changed
+15-1Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
docker:
215
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
3-
digest: sha256:ae600f36b6bc972b368367b6f83a1d91ec2c82a4a116b383d67d547c56fe6de3
16+
digest: sha256:ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6
17+
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
name: docs
6+
jobs:
7+
docs:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
- name: Setup Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: "3.10"
16+
- name: Install nox
17+
run: |
18+
python -m pip install --upgrade setuptools pip wheel
19+
python -m pip install nox
20+
- name: Run docs
21+
run: |
22+
nox -s docs
23+
docfx:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
- name: Setup Python
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: "3.10"
32+
- name: Install nox
33+
run: |
34+
python -m pip install --upgrade setuptools pip wheel
35+
python -m pip install nox
36+
- name: Run docfx
37+
run: |
38+
nox -s docfx
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
name: lint
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
- name: Setup Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: "3.10"
16+
- name: Install nox
17+
run: |
18+
python -m pip install --upgrade setuptools pip wheel
19+
python -m pip install nox
20+
- name: Run lint
21+
run: |
22+
nox -s lint
23+
- name: Run lint_setup_py
24+
run: |
25+
nox -s lint_setup_py
+57Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
name: unittest
6+
jobs:
7+
unit:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Setup Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python }}
19+
- name: Install nox
20+
run: |
21+
python -m pip install --upgrade setuptools pip wheel
22+
python -m pip install nox
23+
- name: Run unit tests
24+
env:
25+
COVERAGE_FILE: .coverage-${{ matrix.python }}
26+
run: |
27+
nox -s unit-${{ matrix.python }}
28+
- name: Upload coverage results
29+
uses: actions/upload-artifact@v2
30+
with:
31+
name: coverage-artifacts
32+
path: .coverage-${{ matrix.python }}
33+
34+
cover:
35+
runs-on: ubuntu-latest
36+
needs:
37+
- unit
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
- name: Setup Python
42+
uses: actions/setup-python@v2
43+
with:
44+
python-version: "3.10"
45+
- name: Install coverage
46+
run: |
47+
python -m pip install --upgrade setuptools pip wheel
48+
python -m pip install coverage
49+
- name: Download coverage results
50+
uses: actions/download-artifact@v2
51+
with:
52+
name: coverage-artifacts
53+
path: .coverage-results/
54+
- name: Report coverage results
55+
run: |
56+
coverage combine .coverage-results/.coverage*
57+
coverage report --show-missing --fail-under=100

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.