Adding local checks. * Check the README.rst files are up to date. * Run the Python linting. Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
diff --git a/.github/workflows/checks-basic.yml b/.github/workflows/checks-basic.yml index a343a8e..91fcade 100644 --- a/.github/workflows/checks-basic.yml +++ b/.github/workflows/checks-basic.yml
@@ -14,7 +14,7 @@ # # SPDX-License-Identifier: Apache 2.0 -name: Checks +name: Checks Basic on: push: @@ -22,7 +22,7 @@ jobs: - Basic: + Run: runs-on: ubuntu-latest steps:
diff --git a/.github/workflows/checks-local.yml b/.github/workflows/checks-local.yml new file mode 100644 index 0000000..0d7b003 --- /dev/null +++ b/.github/workflows/checks-local.yml
@@ -0,0 +1,60 @@ +# Copyright 2019-2021 SkyWater PDK Authors +# +# 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 +# +# https://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. +# +# SPDX-License-Identifier: Apache 2.0 + +name: Checks Local + +on: + push: + pull_request: + +jobs: + + Run: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: true + + - name: Setup environment. + run: make env + + - name: Linting Python + run: make lint-python + + - name: Check README.rst files are up to date + run: | + # Updating rst files + echo "::group::Updating rst files" + make update-rst + echo "::endgroup::" + echo + + # Check if there are any changes + if [[ -z "$(git status -s)" ]]; then + echo "Repository up to date!" + exit 0 + else + echo + git status -s + echo + echo "::group::Diffs" + git diff + echo "::endgroup::" + exit 1 + fi