From ed11ea682a176a361c3e8b0f240ac6bd7bdab63b Mon Sep 17 00:00:00 2001
From: Felix Boerner <ich@felix-boerner.de>
Date: Wed, 10 Jan 2024 07:20:26 +0000
Subject: [PATCH] test: combine workflows

---
 /dev/null                     |   89 -----------------------------
 .github/workflows/release.yml |    1 
 .github/workflows/tests.yml   |   83 +++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 90 deletions(-)

diff --git a/.github/workflows/peformance.yml b/.github/workflows/peformance.yml
deleted file mode 100644
index 780b2f2..0000000
--- a/.github/workflows/peformance.yml
+++ /dev/null
@@ -1,89 +0,0 @@
-name: Web-Performance
-'on':
-  push:
-    branches:
-      - master
-  pull_request:
-jobs:
-  hugo:
-    name: Hugo
-    runs-on: ubuntu-latest
-    steps:
-      - name: Check out repository
-        uses: actions/checkout@v4
-
-      - name: Setup Hugo
-        uses: peaceiris/actions-hugo@v2
-
-      - name: Build Hugo example site with image
-        run: |
-          cd tests/exampleSiteWithImage/
-          hugo --logLevel=info --baseURL= --themesDir=../../../
-
-      - name: Upload Hugo example site with image
-        uses: actions/upload-artifact@v4
-        with:
-          name: hugo-example-site-with-image
-          path: tests/exampleSiteWithImage/public
-
-      - name: Build Hugo example site with video
-        run: |
-          cd tests/exampleSiteWithVideo/
-          hugo --logLevel=info --baseURL= --themesDir=../../../
-
-      - name: Upload Hugo example site with video
-        uses: actions/upload-artifact@v4
-        with:
-          name: hugo-example-site-with-video
-          path: tests/exampleSiteWithVideo/public
-
-  sitespeed:
-    name: Sitespeed.io
-    runs-on: ubuntu-latest
-    steps:
-      - name: Check out repository
-        uses: actions/checkout@v4
-
-      - name: Run sitespeed.io for example site with image in desktop mode
-        run: |
-          rm --recursive --force tests/exampleSiteWithImage/sitespeed-result
-          docker compose --file tests/exampleSiteWithImage/docker-compose.desktop.yml up --exit-code-from sitespeed
-
-      - name: Upload sitespeed.io result for example site with image in desktop mode
-        uses: actions/upload-artifact@v4
-        with:
-          name: sitespeed.io-example-site-with-image-desktop
-          path: tests/exampleSiteWithImage/sitespeed-result
-
-      - name: Run sitespeed.io for example site with image in mobile mode
-        run: |
-          rm --recursive --force tests/exampleSiteWithImage/sitespeed-result
-          docker compose --file tests/exampleSiteWithImage/docker-compose.mobile.yml up --exit-code-from sitespeed
-
-      - name: Upload sitespeed.io result for example site with image in mobile mode
-        uses: actions/upload-artifact@v4
-        with:
-          name: sitespeed.io-example-site-with-image-mobile
-          path: tests/exampleSiteWithImage/sitespeed-result
-
-      - name: Run sitespeed.io for example site with video in desktop mode
-        run: |
-          rm --recursive --force tests/exampleSiteWithVideo/sitespeed-result
-          docker compose --file tests/exampleSiteWithVideo/docker-compose.desktop.yml up --exit-code-from sitespeed
-
-      - name: Upload sitespeed.io result for example site with video in desktop mode
-        uses: actions/upload-artifact@v4
-        with:
-          name: sitespeed.io-example-site-with-video-desktop
-          path: tests/exampleSiteWithVideo/sitespeed-result
-
-      - name: Run sitespeed.io for example site with video in mobile mode
-        run: |
-          rm --recursive --force tests/exampleSiteWithVideo/sitespeed-result
-          docker compose --file tests/exampleSiteWithVideo/docker-compose.mobile.yml up --exit-code-from sitespeed
-
-      - name: Upload sitespeed.io result for example site with video in mobile mode
-        uses: actions/upload-artifact@v4
-        with:
-          name: sitespeed.io-example-site-with-video-mobile
-          path: tests/exampleSiteWithVideo/sitespeed-result
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 62341f5..ec511ac 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -3,7 +3,6 @@
   workflow_run:
     workflows:
       - Tests
-      - Web-Performance
     branches:
       - master
     types:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index a2c1b3e..499cae2 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -323,3 +323,86 @@
         if: steps.check_go.outputs.files_exists == 'true'
         run: |
           staticcheck
+
+  hugo:
+    name: Hugo
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Setup Hugo
+        uses: peaceiris/actions-hugo@v2
+
+      - name: Build Hugo example site with image
+        run: |
+          cd tests/exampleSiteWithImage/
+          hugo --logLevel=info --baseURL= --themesDir=../../../
+
+      - name: Upload Hugo example site with image
+        uses: actions/upload-artifact@v4
+        with:
+          name: hugo-example-site-with-image
+          path: tests/exampleSiteWithImage/public
+
+      - name: Build Hugo example site with video
+        run: |
+          cd tests/exampleSiteWithVideo/
+          hugo --logLevel=info --baseURL= --themesDir=../../../
+
+      - name: Upload Hugo example site with video
+        uses: actions/upload-artifact@v4
+        with:
+          name: hugo-example-site-with-video
+          path: tests/exampleSiteWithVideo/public
+
+  sitespeed:
+    name: Sitespeed.io
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Run sitespeed.io for example site with image in desktop mode
+        run: |
+          rm --recursive --force tests/exampleSiteWithImage/sitespeed-result
+          docker compose --file tests/exampleSiteWithImage/docker-compose.desktop.yml up --exit-code-from sitespeed
+
+      - name: Upload sitespeed.io result for example site with image in desktop mode
+        uses: actions/upload-artifact@v4
+        with:
+          name: sitespeed.io-example-site-with-image-desktop
+          path: tests/exampleSiteWithImage/sitespeed-result
+
+      - name: Run sitespeed.io for example site with image in mobile mode
+        run: |
+          rm --recursive --force tests/exampleSiteWithImage/sitespeed-result
+          docker compose --file tests/exampleSiteWithImage/docker-compose.mobile.yml up --exit-code-from sitespeed
+
+      - name: Upload sitespeed.io result for example site with image in mobile mode
+        uses: actions/upload-artifact@v4
+        with:
+          name: sitespeed.io-example-site-with-image-mobile
+          path: tests/exampleSiteWithImage/sitespeed-result
+
+      - name: Run sitespeed.io for example site with video in desktop mode
+        run: |
+          rm --recursive --force tests/exampleSiteWithVideo/sitespeed-result
+          docker compose --file tests/exampleSiteWithVideo/docker-compose.desktop.yml up --exit-code-from sitespeed
+
+      - name: Upload sitespeed.io result for example site with video in desktop mode
+        uses: actions/upload-artifact@v4
+        with:
+          name: sitespeed.io-example-site-with-video-desktop
+          path: tests/exampleSiteWithVideo/sitespeed-result
+
+      - name: Run sitespeed.io for example site with video in mobile mode
+        run: |
+          rm --recursive --force tests/exampleSiteWithVideo/sitespeed-result
+          docker compose --file tests/exampleSiteWithVideo/docker-compose.mobile.yml up --exit-code-from sitespeed
+
+      - name: Upload sitespeed.io result for example site with video in mobile mode
+        uses: actions/upload-artifact@v4
+        with:
+          name: sitespeed.io-example-site-with-video-mobile
+          path: tests/exampleSiteWithVideo/sitespeed-result

--
Gitblit v1.10.0