use @platforms instead of @bazel_tools//platforms #2131
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub CI | |
on: | |
push: | |
branches: | |
- master | |
- r* | |
pull_request: | |
branches: | |
- master | |
- r* | |
jobs: | |
yapf-test: | |
name: Yapf Python code format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Ensure contributor used ("yapf --style=./.yapf -ri ./**/*.py") before commit | |
run: bash tools/run_build.sh yapf-test | |
source_code_test: | |
name: Check that the source code is compliant | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v2 | |
- name: Run type check | |
run: bash tools/run_build.sh source_code_test | |
valid_build_files: | |
name: Valid build files | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run type check | |
run: bash tools/run_build.sh valid_build_files | |
clang-format: | |
name: Clang C++ code format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run type check | |
run: bash tools/run_build.sh clang-format | |
check-bazel-format: | |
name: Bazel code format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run type check | |
run: bash tools/run_build.sh check-bazel-format | |
pre-commit: | |
name: Check that the pre-commit works | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checking the pre-commit | |
run: bash tools/pre-commit.sh | |
docs_tests: | |
name: Check that we can build the docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v2 | |
- name: Building the docs | |
run: bash tools/run_build.sh docs_tests | |
test_cpu_in_small_docker_image: | |
name: Run the cpu tests in a small python docker image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v2 | |
- run: bash tools/run_cpu_tests.sh | |
valid-codeowners: | |
name: Check that the CODEOWNERS is valid | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- run: pip install pygithub click | |
- name: Check that the CODEOWNERS is valid | |
run: python .github/workflows/notify_codeowners.py .github/CODEOWNERS | |
nbfmt: | |
name: Notebook format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v2 | |
- name: Install tensorflow-docs | |
run: python3 -m pip install -U git+https://github.com/tensorflow/docs | |
- name: Check notebook formatting | |
run: | | |
# Run on all notebooks to prevent upstream change. | |
echo "Check formatting with nbfmt:" | |
python3 -m pip install --upgrade protobuf==4.23.4 | |
python3 -m tensorflow_docs.tools.nbfmt --test \ | |
$(find docs/tutorials/ -type f -name *.ipynb) | |
nblint: | |
name: Notebook lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v2 | |
- name: Install tensorflow-docs | |
run: python3 -m pip install -U git+https://github.com/tensorflow/docs | |
- name: Lint notebooks | |
run: | | |
# Run on all notebooks to prevent upstream change. | |
echo "Lint check with nblint:" | |
python3 -m pip install --upgrade protobuf==4.23.4 | |
python3 -m tensorflow_docs.tools.nblint \ | |
--arg=repo:tensorflow/recommenders-addons \ | |
--exclude_lint=tensorflow::button_colab \ | |
--exclude_lint=google::second_person \ | |
--exclude_lint=tensorflow::button_download \ | |
--exclude_lint=tensorflow::button_github \ | |
--exclude_lint=tensorflow::button_website \ | |
$(find docs/tutorials/ -type f -name *.ipynb ! -path "docs/tutorials/_template.ipynb") |