From 81bce61d442efb4685f9aab181e53768920630b5 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 16 Jul 2021 14:58:42 +0200 Subject: [PATCH] fix badge update workflow (#84) --- .github/workflows/update-badges.yml | 21 ++++++++++++++++----- README.md | 8 ++++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/update-badges.yml b/.github/workflows/update-badges.yml index 547294f58..fc5aaab42 100644 --- a/.github/workflows/update-badges.yml +++ b/.github/workflows/update-badges.yml @@ -13,6 +13,14 @@ jobs: container: python:3.8 steps: - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: Telecominfraproject/wlan-lanforge-scripts + path: lanforge/lanforge-scripts + - uses: actions/checkout@v2 + with: + ref: badges + path: badges - name: add TIP pypi repo run: | @@ -28,12 +36,13 @@ jobs: working-directory: tests run: | mkdir -p ../.img - wget https://img.shields.io/badge/total_tests-$(pytest --collect-only -q | tail -1 | cut -d ' ' -f 1)-green?style=flat-square -O ../.img/total-count.svg - wget https://img.shields.io/badge/interop_tests-$(pytest --collect-only -m "interop" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../.img/interop-count.svg - wget https://img.shields.io/badge/sanity_tests-$(pytest --collect-only -m "sanity and not interop" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../.img/sanity-count.svg - wget https://img.shields.io/badge/performance_tests-$(pytest --collect-only -m "performance" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../.img/performance-count.svg + wget https://img.shields.io/badge/total_tests-$(pytest --collect-only -q | tail -1 | cut -d ' ' -f 1)-green?style=flat-square -O ../badges/total-count.svg + wget https://img.shields.io/badge/interop_tests-$(pytest --collect-only -m "interop" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/interop-count.svg + wget https://img.shields.io/badge/sanity_tests-$(pytest --collect-only -m "sanity and not interop" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/sanity-count.svg + wget https://img.shields.io/badge/performance_tests-$(pytest --collect-only -m "performance" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/performance-count.svg - name: commit changes + working-directory: badges run: | git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" @@ -45,4 +54,6 @@ jobs: uses: ad-m/github-push-action@v0.6.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master \ No newline at end of file + directory: badges + branch: badges + force: true \ No newline at end of file diff --git a/README.md b/README.md index 3a5553e75..91fa683a1 100644 --- a/README.md +++ b/README.md @@ -62,16 +62,16 @@ http://pythontesting.net/framework/pytest/pytest-introduction/ ### Test status -![total test count](.img/total-count.svg) +![total test count](https://raw.githubusercontent.com/Telecominfraproject/wlan-testing/badges/total-count.svg) [![sanity testing](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/sanity.yml/badge.svg)](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/sanity.yml) -![sanity test count](.img/sanity-count.svg) +![sanity test count](https://raw.githubusercontent.com/Telecominfraproject/wlan-testing/badges/sanity-count.svg) [![interop testing](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/interop.yml/badge.svg)](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/interop.yml) -![interop test count](.img/interop-count.svg) +![interop test count](https://raw.githubusercontent.com/Telecominfraproject/wlan-testing/badges/interop-count.svg) [![performance testing](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/performance.yml/badge.svg)](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/performance.yml) -![performance test count](.img/performance-count.svg) +![performance test count](https://raw.githubusercontent.com/Telecominfraproject/wlan-testing/badges/performance-count.svg) ### Best Practice