Bug fixes: 1) time.Duration function wrong unit; 2) transceiver disable OC path #15874
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: Pull Request | |
on: [pull_request] | |
jobs: | |
check_ips: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Setup Perl | |
uses: perl-actions/install-with-cpanm@10d60f00b4073f484fc29d45bfbe2f776397ab3d | |
with: | |
install: | | |
Net::IP | |
- name: Checkout code | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: IP Addresses Assignment | |
run: | | |
git diff --name-only main | while read l; do | |
./tools/check_ip_addresses.pl $l; | |
done | |
check_style: | |
name: Check style against CONTRIBUTING.md | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Allowed File Types | |
run: ./tools/allowed_file_types.sh | |
- name: Block hyphenated directory names | |
run: | | |
if ! find ./feature -type d -name '*-*' -print -exec false {} +; then | |
echo "Hyphenated directories are not allowed. Please use a different separator like underscore." | |
exit 1 | |
fi | |
- name: Enum | |
run: | | |
fail=0 | |
if find . -name \*.go -exec egrep -n '\.Union.*?\([0-9]+\)' \{} + | |
then | |
echo "Please do not use numerical constants in a union." >&2 | |
echo "See CONTRIBUTING.md#enum" >&2 | |
fail=1 | |
fi | |
if find . -name \*.go -exec egrep -n '_Union\([0-9]+\)' \{} + | |
then | |
echo "Please do not use numerical constants in a union." >&2 | |
echo "See CONTRIBUTING.md#enum" >&2 | |
fail=1 | |
fi | |
exit "${fail}" | |
- name: Default NetworkInstance | |
run: | | |
if find . -name \*.go -exec egrep -n '"default"' \{} + | |
then | |
echo "Default network instance name should be uppercase." >&2 | |
echo "See CONTRIBUTING.md#default-network-instance" >&2 | |
exit 1 | |
fi | |
otg_changes: | |
name: OTG Changes Required | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Check if OTG changes required | |
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 | |
with: | |
script: | | |
const script = require('./.github/workflows/required_otg_changes_check.js') | |
await script({github, context, core}) |