diff --git a/tensorflow_hub/.github/workflows/contributions-validator.yml b/tensorflow_hub/.github/workflows/contributions-validator.yml new file mode 100644 index 000000000..acc2dbbf8 --- /dev/null +++ b/tensorflow_hub/.github/workflows/contributions-validator.yml @@ -0,0 +1,42 @@ +# Copyright 2020 The TensorFlow Hub Authors. All Rights Reserved. +# +# 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. +# ============================================================================== +name: External contributions validator + +on: + pull_request: + +jobs: + test-changed-md-files: + runs-on: ubuntu-16.04 + name: Test changed markdown documentation files. + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + with: + python-version: '3.6' + - name: Install packages + run: | + pip install absl-py tensorflow tensorflow_hub + pip freeze all + - name: Debug information + run: | + echo $(git status) + echo $(git branch) + echo $(git remote) + echo $(git diff origin/master --name-only) + echo $(ls) + - name: Run validator on changed files + run: | + git diff origin/master --name-only --relative=tfhub_dev/assets | xargs python3.6 ./tfhub_dev/tools/validator.py