Skip to content

fix: counter function #231

fix: counter function

fix: counter function #231

Workflow file for this run

name: ci
on:
workflow_dispatch:
pull_request:
pull_request_target:
types: [labeled]
jobs:
builder:
if: ${{ !( ( github.event_name == 'pull_request' ) && ( github.event.pull_request.head.repo.fork == true ) ) }}
uses: ./.github/workflows/build_image.yaml
secrets: inherit
with:
file: ./docker/builder.Dockerfile
platforms: linux/amd64
targets: >-
["builder"]
build-snmpd:
if: ${{ !( ( github.event_name == 'pull_request' ) && ( github.event.pull_request.head.repo.fork == true ) ) }}
uses: ./.github/workflows/build_image.yaml
secrets: inherit
with:
file: ./docker/snmpd.Dockerfile
platforms: linux/amd64
targets: >-
["snmpd"]
build-agents:
if: ${{ !( ( github.event_name == 'pull_request' ) && ( github.event.pull_request.head.repo.fork == true ) ) }}
needs: builder
uses: ./.github/workflows/build_image.yaml
secrets: inherit
# using matrix here is not supported yet
# https://github.community/t/reusable-workflow-with-strategy-matrix/205676/8
with:
file: ./docker/agent.Dockerfile
platforms: linux/amd64
build-args: GS_MGMT_BUILDER_IMAGE=${{ needs.builder.outputs.tags }}
targets: >-
["north-cli", "north-snmp", "north-netconf", "north-notif", "north-gnmi", "south-sonic", "south-ocnos", "south-tai", "south-onlp", "south-system", "south-gearbox", "south-dpll", "south-netlink", "xlate-oc", "xlate-or", "system-telemetry"]
tester:
if: ${{ !( ( github.event_name == 'pull_request' ) && ( github.event.pull_request.head.repo.fork == true ) ) }}
uses: ./.github/workflows/build_image.yaml
secrets: inherit
with:
file: ./docker/builder.Dockerfile
platforms: linux/amd64
targets: >-
["tester"]
unittest:
if: ${{ !( ( github.event_name == 'pull_request' ) && ( github.event.pull_request.head.repo.fork == true ) ) }}
needs: tester
runs-on: ubuntu-latest
steps:
-
name: Checkout - same repo
uses: actions/checkout@v3
if: github.event.pull_request.head.repo.fork == false
with:
submodules: recursive
fetch-depth: 0
-
name: Checkout - forked repo
uses: actions/checkout@v3
if: >-
( github.event_name == 'pull_request_target' ) &&
( github.event.pull_request.head.repo.fork == true )
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
-
name: Lint
run: "docker run -t -v `pwd`:`pwd` -w `pwd` ${{ needs.tester.outputs.tags }} make lint"
-
name: Unittest
run: "docker run -t -v `pwd`:`pwd` -w `pwd` ${{ needs.tester.outputs.tags }} make unittest"
rust-tester:
if: ${{ !( ( github.event_name == 'pull_request' ) && ( github.event.pull_request.head.repo.fork == true ) ) }}
uses: ./.github/workflows/build_image.yaml
secrets: inherit
with:
file: ./docker/builder.Dockerfile
platforms: linux/amd64
targets: >-
["rust-tester"]
rust-unittest:
if: ${{ !( ( github.event_name == 'pull_request' ) && ( github.event.pull_request.head.repo.fork == true ) ) }}
needs: rust-tester
runs-on: ubuntu-latest
steps:
-
name: Checkout - same repo
uses: actions/checkout@v3
if: github.event.pull_request.head.repo.fork == false
with:
submodules: recursive
fetch-depth: 0
-
name: Checkout - forked repo
uses: actions/checkout@v3
if: >-
( github.event_name == 'pull_request_target' ) &&
( github.event.pull_request.head.repo.fork == true )
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
-
name: Unittest
run: "docker run -t -v `pwd`:`pwd` -w `pwd` ${{ needs.rust-tester.outputs.tags }} make rust-unittest"