Merge pull request #16 from mithro/add-test Add basic CI checking
diff --git a/.github/workflows/checks-basic.yml b/.github/workflows/checks-basic.yml index 963eca4..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,11 +22,11 @@ jobs: - Basic: + Run: runs-on: ubuntu-latest steps: - - uses: actions/checkout@main + - uses: actions/checkout@v2 with: submodules: true
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
diff --git a/Makefile b/Makefile index fb071b6..e187ffd 100644 --- a/Makefile +++ b/Makefile
@@ -48,8 +48,10 @@ -e's@.. warning::@*Warning*@g' \ > $@ -update-rst: $(RST_OUT) +update-rst: @echo Found $(RST_SRC) source files. + @touch $(RST_SRC) + make $(RST_OUT) COPYRIGHT_HOLDER := SkyWater PDK Authors
diff --git a/README.rst b/README.rst index 8882750..56b6491 100644 --- a/README.rst +++ b/README.rst
@@ -17,7 +17,7 @@ `Google skywater-pdk <https://github.com/google/skywater-pdk>`__ and `related modules <https://github.com/google?q=skywater-pdk&type=&language=>`__. -.. image:: https://github.com/google/skywater-pdk/raw/main/docs/_static/skywater-pdk-logo.png +.. image:: https://github.com/google/skywater-pdk/raw/master/docs/_static/skywater-pdk-logo.png :alt: Google + SkyWater Logo Image :align: center :target: https://github.com/google/skywater-pdk @@ -29,8 +29,8 @@ Modules Related --------------- -`modules-pr-backporter <./modules-pr-backporter>`_ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +```modules-pr-backporter`` <./modules-pr-backporter>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ``modules-pr-backporter`` action is used on the `SkyWater modules <https://github.com/google?q=skywater-pdk-libs>`__ @@ -39,8 +39,8 @@ to enable automatic backporting of pull requests to older released versions. -`modules-roller <./modules-roller>`_ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +```modules-roller`` <./modules-roller>`__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ``modules-roller`` action is used by `the primary SkyWater PDK repo <https://github.com/google/skywater-pdk>`__ @@ -65,7 +65,7 @@ ======= The SkyWater Open Source PDK GitHub actions are released under the -`Apache 2.0 license <https://github.com/google/skywater-pdk/blob/main/LICENSE>`_. +`Apache 2.0 license <https://github.com/google/skywater-pdk/blob/master/LICENSE>`_. The copyright details (which should also be found at the top of every file) are;