Skip to content

Commit

Permalink
Merge pull request #65 from PelionIoT/weekly-edge-testnet
Browse files Browse the repository at this point in the history
Weekly test-run on edge-testnet
  • Loading branch information
JanneKiiskila authored Jul 12, 2024
2 parents ec39768 + 5e8f06c commit 75bf5b8
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 11 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/edge-testnet-snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: edge-testnet-weekly
run-name: ${{ github.actor }} edge-testnet-w-snap
on:
push:
paths:
- .github/workflows/edge-testnet-snap.yml
workflow_dispatch:
schedule:
# Once week 07:30 Sun
- cron: '30 7 * * Sun'

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: edge-testnet-weekly-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
edge-testnet-weekly:
runs-on: [ "self-hosted" ]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v4
- name: Run edge-testnet
run: SNAP=snap fw-tools/edge-testnet
- name: Post status to Slack test-infra channel
if: always()
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
channel: '#test-infra'
20 changes: 20 additions & 0 deletions .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Misspell
on:
push:
workflow_dispatch:

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: misspell-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
misspell:
runs-on: ["self-hosted", "client"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Misspell
uses: PelionIoT/actions/.github/actions/misspell@main
with:
exceptions: "mosquitto"
9 changes: 0 additions & 9 deletions .github/workflows/pr-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,6 @@ jobs:
- uses: actions/checkout@v4
- run: ./check_versions.sh

misspell:
runs-on: [ "self-hosted", "client" ]
steps:
- name: Run misspell (findings may not increase)
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
bin/misspell -i mosquitto
run-edge-info:
runs-on: ubuntu-22.04
steps:
Expand Down
4 changes: 2 additions & 2 deletions fw-tools/edge-testnet
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ verbose() {
}

# Extract the server name from the URL - bootstrap/lwm2m/edge-k8s/gateways/containers
# If the URL starts with "edge-k8s", the server name will be from the begining until the second hyphen or the first dot.
# If the URL starts with "edge-k8s", the server name will be from the beginning until the second hyphen or the first dot.
# If the URL starts with "tcp-"/"udp-", the server name will come after "tcp-"/"udp-" until the first dot or hyphen
# In other cases the server name will be from the beginning until the first dot or hyphen
#
Expand All @@ -90,7 +90,7 @@ extract_server_name() {

if [[ $URL =~ ^(edge-k8s) ]]; then
# If the URL starts with edge-k8s,
# Extract the substring from the begining until the second hyphen
# Extract the substring from the beginning until the second hyphen
# Or from the beginning until the first dot.
# In practice it will be "edge-k8s".
RESULT=$(echo "$URL" | grep -o '^[^-]*-[^-]*' | grep -o '^[^.]*')
Expand Down

0 comments on commit 75bf5b8

Please sign in to comment.