mirror of
https://github.com/armbian/scripts.git
synced 2026-01-06 10:32:48 -08:00
Update smoke-tests.yml
This commit is contained in:
27
.github/workflows/smoke-tests.yml
vendored
27
.github/workflows/smoke-tests.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
Prepare:
|
||||
name: "Power system on"
|
||||
outputs:
|
||||
matrix: ${{steps.list_dirs.outputs.matrix}}
|
||||
matrix: ${{steps.json.outputs.JSON_CONTENT}}
|
||||
runs-on: [self-hosted, Linux, local]
|
||||
steps:
|
||||
|
||||
@@ -30,6 +30,7 @@ jobs:
|
||||
uses: armbian/actions/runner-prepare@main
|
||||
|
||||
- name: Power on
|
||||
if: ${{ true.test }}
|
||||
uses: armbian/actions/power-on@main
|
||||
with:
|
||||
KEY_POWER_ON: ${{ secrets.KEY_POWER_ON }}
|
||||
@@ -38,14 +39,21 @@ jobs:
|
||||
KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
|
||||
|
||||
- name: Determine changed kernels
|
||||
id: list_dirs
|
||||
id: json
|
||||
run: |
|
||||
|
||||
echo ::set-output name=matrix::$(
|
||||
curl -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" -H "Accept: application/json; indent=4" \
|
||||
"https://stuff.armbian.com/netbox/api/dcim/devices/?limit=500&name__empty=false&tenant=igor&status=active&device_role=DUT&tag=qa" \
|
||||
| jq '.results[] | .display, .primary_ip.address' | xargs -n2 -d'\n' | grep -v null | sed -e 's/ ([^()]*)//g' \
|
||||
| sed 's/\/24"/"/g' | sed "s/\" \"/:/g" | sed "s/\"//g" |jq -cnR '[inputs | select(length>0)]' | jq)
|
||||
echo 'JSON_CONTENT<<EOF' >> $GITHUB_OUTPUT
|
||||
echo '[
|
||||
"FriendlyElec Zero Pi:10.0.30.195",
|
||||
"FriendlyElec Nanopi Neo 2 black:10.0.30.184"
|
||||
]'
|
||||
echo 'EOF' >> $GITHUB_OUTPUT
|
||||
|
||||
#echo ::set-output name=matrix::$(
|
||||
#curl -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" -H "Accept: application/json; indent=4" \
|
||||
#"https://stuff.armbian.com/netbox/api/dcim/devices/?limit=500&name__empty=false&tenant=igor&status=active&device_role=DUT&tag=qa" \
|
||||
#| jq '.results[] | .display, .primary_ip.address' | xargs -n2 -d'\n' | grep -v null | sed -e 's/ ([^()]*)//g' \
|
||||
#| sed 's/\/24"/"/g' | sed "s/\" \"/:/g" | sed "s/\"//g" |jq -cnR '[inputs | select(length>0)]' | jq)
|
||||
|
||||
Test:
|
||||
name: "DUT"
|
||||
@@ -57,7 +65,7 @@ jobs:
|
||||
#max-parallel: 16
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
|
||||
node: ${{fromJson(needs.Prepare.outputs.matrix)}}
|
||||
|
||||
steps:
|
||||
@@ -193,7 +201,8 @@ jobs:
|
||||
|
||||
Stop:
|
||||
name: "Power system off"
|
||||
if: always()
|
||||
#if: always()
|
||||
if: ${{ true.test }}
|
||||
needs: Test
|
||||
runs-on: [self-hosted, Linux, local]
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user