[WIFI-5775] Run SDK tests on a PR level (#19)

* Trigger testing with Docker Compose deployment

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Switch to trigger-workflow-and-wait community Github action

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Switch to latest version

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Use trigger-workflow-and-wait composite action

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Pass versions as one JSON string

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Remove ref since PR was merged

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
This commit is contained in:
Johann Hoffmann
2022-01-17 17:37:11 +01:00
committed by GitHub
parent 707014d698
commit b4ab5192d3

View File

@@ -63,3 +63,33 @@ jobs:
if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/pull/') || github.ref == 'refs/heads/main' if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/pull/') || github.ref == 'refs/heads/main'
run: | run: |
docker images | grep ${{ env.DOCKER_REGISTRY_URL }}/owfms | awk -F ' ' '{print $1":"$2}' | xargs -I {} docker push {} docker images | grep ${{ env.DOCKER_REGISTRY_URL }}/owfms | awk -F ' ' '{print $1":"$2}' | xargs -I {} docker push {}
trigger-testing:
if: startsWith(github.ref, 'refs/pull/')
runs-on: ubuntu-latest
needs: docker
steps:
- name: Get base branch name and set as output
id: get_base_branch
run: |
echo ::set-output name=branch::$(echo ${GITHUB_BASE_REF##*/})
echo ::set-output name=owgw_branch::$(echo ${GITHUB_BASE_REF##*/} | sed 's/main/master/g')
- name: Checkout actions repo
uses: actions/checkout@v2
with:
repository: Telecominfraproject/.github
path: github
- name: Trigger testing of OpenWifi Docker Compose deployment and wait for result
uses: ./github/composite-actions/trigger-workflow-and-wait
env:
BASE_BRANCH: ${{ steps.get_base_branch.outputs.branch }}
OWGW_BASE_BRANCH: ${{ steps.get_base_branch.outputs.owgw_branch }}
with:
owner: Telecominfraproject
repo: wlan-testing
workflow: ow_docker-compose.yml
token: ${{ secrets.WLAN_TESTING_PAT }}
ref: master
inputs: '{"owgw_version": "${{ env.OWGW_BASE_BRANCH }}", "owgwui_version": "${{ env.BASE_BRANCH }}", "owsec_version": "${{ env.BASE_BRANCH }}", "owfms_version": "${{ github.sha }}", "owprov_version": "main", "owprovui_version": "main"}'