diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 916b14da2b..f3a53a8b6f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,11 @@ name: Build and Test -on: [push, pull_request] +on: + push: + pull_request: + schedule: + # Run Sunday at midnight + - cron: '0 0 * * 0' jobs: build-linux: @@ -49,10 +54,26 @@ jobs: steps: - name: checkout + if: github.event_name == 'push' || github.event_name == 'pull_request' uses: actions/checkout@v2 with: submodules: recursive + # For weekly runs, don't update submodules + - name: checkout without submodule + if: github.event_name == 'schedule' + uses: actions/checkout@v2 + + # Weekly runs test using OVS master instead of the + # submodule. + - name: checkout OVS master + if: github.event_name == 'schedule' + uses: actions/checkout@v2 + with: + repository: 'openvswitch/ovs' + path: 'ovs' + ref: 'master' + - name: update APT cache run: sudo apt update @@ -105,9 +126,23 @@ jobs: steps: - name: checkout + if: github.event_name == 'push' || github.event_name == 'pull_request' uses: actions/checkout@v2 with: submodules: recursive + # For weekly runs, don't update submodules + - name: checkout without submodule + if: github.event_name == 'schedule' + uses: actions/checkout@v2 + # Weekly runs test using OVS master instead of the + # submodule. + - name: checkout OVS master + if: github.event_name == 'schedule' + uses: actions/checkout@v2 + with: + repository: 'openvswitch/ovs' + path: 'ovs' + ref: 'master' - name: install dependencies run: brew install automake libtool - name: prepare