Adding deviations interface_ref_interface_id_format for Juniper devices #5726
Workflow file for this run
This file contains hidden or 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: README Canonical OC | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| schedule: | |
| - cron: "49 0 * * *" | |
| jobs: | |
| integration-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: false | |
| - name: Validate Canonical OC Validation Script | |
| run: | | |
| cd tools/validate_readme_canonicalocspec | |
| ./validate_readme_canonicalocspec_test.sh | |
| - name: Validate Template README | |
| run: | | |
| go install ./tools/validate_readme_canonicalocspec | |
| validate_readme_canonicalocspec --alsologtostderr doc/test-requirements-template.md | |
| - name: Validate Test READMEs | |
| run: | | |
| go install ./tools/validate_readme_canonicalocspec | |
| # TODO: Just use this one line after all READMEs have converted to the new format. | |
| # validate_readme_canonicalocspec --alsologtostderr "${exemption_flags[@]}" | |
| function validate() { | |
| local exemption_flags=() | |
| while IFS= read -r path; do | |
| exemption_flags+="--non-test-readme $path " | |
| done < ./tools/non_test_readmes.txt | |
| validate_readme_canonicalocspec --feature-dir "$1" --alsologtostderr ${exemption_flags} | |
| } | |
| ##### BEGIN: Validate Changed Test READMEs # TODO: Remove this section after all are converted. | |
| # Adapted from rebase_check.yml | |
| # Notes: | |
| # * Do not use ${GITHUB_REF}, github.sha, or HEAD because they are | |
| # the merged commit of the pull request and main. There are no | |
| # outdated files in the merged commit. | |
| # * refs/pull/${pr_number}/head is not available, so use | |
| # github.event.pull_request.head.sha which is the "head sha" of | |
| # the event that triggered the pull request. | |
| # * Do not use github.event.pull_request.base.sha because it is | |
| # the base when the pull request was created, not after a rebase. | |
| # Ask git merge-base to tell us a suitable base. | |
| readonly HEAD="${{ github.event.pull_request.head.sha }}" | |
| if [ ! -z "${HEAD}" ]; then | |
| readonly BASE="$(git merge-base origin/main "${HEAD}")" | |
| affected_readmes=() | |
| for path in $(git diff --name-only --diff-filter=ACMRT "${BASE}" "${HEAD}" | grep -E '^\W*feature' | sort -u); do | |
| if [[ "$path" == *README.md ]]; then | |
| affected_readmes+=("$path") | |
| fi | |
| done | |
| echo "########## READMEs in changed directories to be validated (including ones to be exempted):" | |
| printf '%s\n' "${affected_readmes[@]}" | |
| echo "########## Validating READMEs in changed directories:" | |
| exemption_flags=() | |
| while IFS= read -r path; do | |
| exemption_flags+="--non-test-readme $path " | |
| done < ./tools/non_test_readmes.txt | |
| for f in "${affected_readmes[@]}"; do | |
| validate_readme_canonicalocspec --alsologtostderr ${exemption_flags} "${f}" | |
| done | |
| fi | |
| ##### END: Validate Changed Test READMEs ##### | |
| # TODO: Validate READMEs that have been converted to the new format. | |
| # echo "########## Validating already-converted READMEs:" | |