Skip to content

Commit

Permalink
chore: move docs check from kokoro to GH actions (#334)
Browse files Browse the repository at this point in the history
* chore: move docs check from kokoro to GH actions

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix typo

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
parthea and gcf-owl-bot[bot] authored Jan 17, 2022
1 parent 8169f2b commit 74d5ce8
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 46 deletions.
1 change: 1 addition & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ branchProtectionRules:
- 'unit_wo_grpc-3.6'
- 'unit_wo_grpc-3.10'
- 'cover'
- 'docs'
permissionRules:
- team: actools-python
permission: admin
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Docs"

on:
pull_request:
branches:
- main
jobs:
run-docs:
name: docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- 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
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Lint"

on:
pull_request:
branches:
- main
jobs:
run-lint-mypy:
name: lint-mypy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- 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
- name: Run mypy
run: |
nox -s mypy
Original file line number Diff line number Diff line change
@@ -1,44 +1,11 @@
name: "Lint / Unit tests / Cover / Mypy"
name: "Unit tests"

on:
pull_request:
branches:
- main


jobs:

run-lint-mypy:
name: lint-mypy
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
- name: Run mypy
run: |
nox -s mypy
run-unittests:
name: unit${{ matrix.option }}-${{ matrix.python }}
runs-on: ubuntu-latest
Expand All @@ -58,28 +25,22 @@ jobs:
python: 3.8
- option: "_wo_grpc"
python: 3.9

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.option }}-${{matrix.python }}
run: |
nox -s unit${{ matrix.option }}-${{ matrix.python }}
- name: Upload coverage results
uses: actions/upload-artifact@v2
with:
Expand All @@ -91,28 +52,22 @@ jobs:
runs-on: ubuntu-latest
needs:
- run-unittests

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*
Expand Down

0 comments on commit 74d5ce8

Please sign in to comment.