-
Notifications
You must be signed in to change notification settings - Fork 20
63 lines (55 loc) · 2.79 KB
/
update-badges.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Update test number badges
on:
push:
branches:
- master
paths:
- "tests/**"
workflow_dispatch:
jobs:
update_badges:
runs-on: ubuntu-latest
container: python:3.8
steps:
- name: Checkout testing repo
uses: actions/checkout@v3
with:
path: wlan-testing
- uses: actions/checkout@v3
with:
ref: badges
path: wlan-testing/badges
- name: Run setup_env.bash
working-directory: wlan-testing
env:
CLOUDSDK_LIBRARY: tip_2x
TEST_DEVICE_NAME: all
PYTHON: /usr/local/bin/python3
PIP: /usr/local/bin/pip3
run: |
./setup_env.bash -t $CLOUDSDK_LIBRARY -d $TEST_DEVICE_NAME -n "TIP Automation" -o TIP -e [email protected] -i "TIP OpenWIFI Library" && pip3 freeze
- name: download badges
working-directory: wlan-testing/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 ../badges/total-count.svg
wget https://img.shields.io/badge/interop_tests-$(pytest --collect-only -m "ow_sanity_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 "ow_sanity_lf" -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
wget https://img.shields.io/badge/advance_tests-$(pytest --collect-only -m "advance" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/advance-count.svg
wget https://img.shields.io/badge/regression_tests-$(pytest --collect-only -m "ow_regression_lf" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/regression-count.svg
# wget https://img.shields.io/badge/interop_performance_tests-$(pytest --collect-only -m "interop_uc_sanity and client_connectivity" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/performance-interop-count.svg
- name: commit changes
working-directory: wlan-testing/badges
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git diff-index --quiet HEAD || git commit -m "Updating test count badges: $(date -u)"
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: wlan-testing/badges
branch: badges
force: true