From 53f31468924bed5164df150f1705480d212ecbbd Mon Sep 17 00:00:00 2001 From: Lewis Chambers Date: Mon, 3 Jun 2024 14:06:46 +0100 Subject: [PATCH] Not running docs test on main branch --- .github/workflows/doc-deployment.yml | 2 +- .github/workflows/doc-test.yml | 2 +- .github/workflows/test-pipeline.yml | 3 ++- README.MD | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/doc-deployment.yml b/.github/workflows/doc-deployment.yml index f8b3a80..cd6fe5c 100644 --- a/.github/workflows/doc-deployment.yml +++ b/.github/workflows/doc-deployment.yml @@ -1,5 +1,5 @@ # Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages +name: Documentation Deployment on: # Runs on pushes targeting the default branch diff --git a/.github/workflows/doc-test.yml b/.github/workflows/doc-test.yml index c3c8cc1..8083c01 100644 --- a/.github/workflows/doc-test.yml +++ b/.github/workflows/doc-test.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: Build Documentation +name: Documentation Test on: [workflow_call] diff --git a/.github/workflows/test-pipeline.yml b/.github/workflows/test-pipeline.yml index ae4b8ab..dc92e8f 100644 --- a/.github/workflows/test-pipeline.yml +++ b/.github/workflows/test-pipeline.yml @@ -9,4 +9,5 @@ jobs: tests: uses: ./.github/workflows/test.yml docs: - uses: ./.github/workflows/doc-test.yml \ No newline at end of file + uses: ./.github/workflows/doc-test.yml + if: ${{ (github.event_name == 'pull_request' && github.head_ref != 'main') || (github.event_name == 'push' && github.ref_name != 'main') }} \ No newline at end of file diff --git a/README.MD b/README.MD index 8a3f38b..a5f1bb1 100644 --- a/README.MD +++ b/README.MD @@ -1,5 +1,5 @@ # IoT Thing Swarm -![tests badge](https://github.com/NERC-CEH/iot-swarm/actions/workflows/test.yml/badge.svg) -![docs badge](https://github.com/NERC-CEH/iot-swarm/actions/workflows/doc-deployment.yml/badge.svg) +[![tests badge](https://github.com/NERC-CEH/iot-swarm/actions/workflows/test.yml/badge.svg)](https://github.com/NERC-CEH/iot-swarm/actions) +[![docs badge](https://github.com/NERC-CEH/iot-swarm/actions/workflows/doc-deployment.yml/badge.svg)](https://nerc-ceh.github.io/iot-swarm/) This is a Python package intended to simulate a swarm of IoT device communications via MQTT, enabling stress testing of cloud infrastructure with loads close to production level. [Read the docs](https://nerc-ceh.github.io/iot-swarm/) \ No newline at end of file