From 37f39b53e4cb47285729a5dd24c8afe42954f75c Mon Sep 17 00:00:00 2001
From: Felix Boerner <ich@felix-boerner.de>
Date: Tue, 09 Jan 2024 10:01:09 +0000
Subject: [PATCH] test: add sitespeed.io tests

---
 tests/exampleSiteWithImage/docker-compose.yml           |   20 ++
 tests/exampleSiteWithVideo/static/favicon.ico           |    0 
 .gitignore                                              |    2 
 .yamllint                                               |    9 +
 tests/exampleSiteWithImage/config.toml                  |    2 
 tests/exampleSiteWithVideo/static/images/social.jpg     |    0 
 .github/workflows/tests.yml                             |  274 ++++++++++++++++++++++++++++++
 tests/exampleSiteWithImage/static/css/style.css         |    0 
 tests/exampleSiteWithVideo/content/purus-sem.md         |    0 
 tests/exampleSiteWithVideo/static/images/background.jpg |    0 
 tests/exampleSiteWithImage/content/purus-sem.md         |    0 
 tests/exampleSiteWithVideo/static/videos/background.mp4 |    0 
 .github/workflows/peformance.yml                        |   65 +++++++
 tests/exampleSiteWithImage/budget.json                  |   18 ++
 tests/exampleSiteWithImage/static/favicon.ico           |    0 
 tests/exampleSiteWithVideo/docker-compose.yml           |   20 ++
 tests/exampleSiteWithImage/content/ipsum-in.md          |    0 
 tests/exampleSiteWithVideo/budget.json                  |   18 ++
 tests/exampleSiteWithImage/content/_index.md            |    0 
 tests/exampleSiteWithImage/content/luctus-urna.md       |    0 
 tests/exampleSiteWithImage/static/images/background.jpg |    0 
 tests/exampleSiteWithVideo/content/_index.md            |    0 
 /dev/null                                               |    7 
 tests/exampleSiteWithImage/static/images/social.jpg     |    0 
 tests/exampleSiteWithVideo/content/ipsum-in.md          |    0 
 tests/exampleSiteWithVideo/config.toml                  |    6 
 tests/exampleSiteWithVideo/static/css/style.css         |    0 
 .github/workflows/release.yml                           |   57 ++++++
 tests/exampleSiteWithVideo/content/luctus-urna.md       |    0 
 tests/exampleSiteWithImage/static/videos/background.mp4 |    0 
 30 files changed, 487 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index c766789..0000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-name: CI
-'on':
-  push:
-    branches:
-      - master
-  pull_request:
-    branches:
-      - master
-jobs:
-  build:
-    name: Build Hugo example site and archive output
-    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
-        run: |
-          cd exampleSite
-          hugo --verbose --baseURL= --themesDir=../../
-
-      - name: Upload Hugo example site
-        uses: actions/upload-artifact@v4
-        with:
-          name: hugo-example-site
-          path: exampleSite/public
-
-  lighthouse:
-    name: Run Lighthouse tests against built Hugo example site
-    runs-on: ubuntu-latest
-    needs: build
-    steps:
-      - name: Check out repository
-        uses: actions/checkout@v4
-
-      - name: Download Hugo example site
-        uses: actions/download-artifact@v4
-        with:
-          name: hugo-example-site
-          path: exampleSite/public
-
-      - name: Run Lighthouse against a static dist dir
-        uses: treosh/lighthouse-ci-action@v10
-        with:
-          configPath: ./lighthouserc.json
diff --git a/.github/workflows/peformance.yml b/.github/workflows/peformance.yml
new file mode 100644
index 0000000..6fa8d0c
--- /dev/null
+++ b/.github/workflows/peformance.yml
@@ -0,0 +1,65 @@
+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
+        run: |
+          docker compose --file tests/exampleSiteWithImage/docker-compose.yml up --exit-code-from sitespeed
+
+      - name: Upload sitespeed.io result for example site with image
+        uses: actions/upload-artifact@v4
+        with:
+          name: sitespeed.io-example-site-with-image
+          path: tests/exampleSiteWithImage/sitespeed-result
+
+      - name: Run sitespeed.io for example site with video
+        run: |
+          docker compose --file tests/exampleSiteWithVideo/docker-compose.yml up --exit-code-from sitespeed
+
+      - name: Upload sitespeed.io result for example site with video
+        uses: actions/upload-artifact@v4
+        with:
+          name: sitespeed.io-example-site-with-video
+          path: tests/exampleSiteWithVideo/sitespeed-result
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..62341f5
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,57 @@
+name: Release
+'on':
+  workflow_run:
+    workflows:
+      - Tests
+      - Web-Performance
+    branches:
+      - master
+    types:
+      - completed
+jobs:
+  release:
+    name: Release
+    runs-on: ubuntu-latest
+    if: ${{ github.event.workflow_run.conclusion == 'success' }}
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+
+      - name: Check for Go files
+        id: check_go
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "**/*.go"
+
+      - name: Fetch all tags
+        if: steps.check_go.outputs.files_exists == 'true'
+        run: git fetch --force --tags
+
+      - name: Set up Go
+        if: steps.check_go.outputs.files_exists == 'true'
+        uses: actions/setup-go@v5
+        with:
+          go-version: 'stable'
+
+      - name: Install GoReleaser
+        if: steps.check_go.outputs.files_exists == 'true'
+        uses: goreleaser/goreleaser-action@v5
+        with:
+          install-only: true
+
+      - name: Set up Node.js
+        uses: actions/setup-node@v4
+        with:
+          node-version: 'lts/*'
+
+      - name: Create Github release
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          if [[ "${{ steps.check_go.outputs.files_exists }}" == "true" ]]; then
+            npx -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/git semantic-release
+          else
+            npx semantic-release
+          fi
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..e7db8c5
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,274 @@
+name: Tests
+'on':
+  push:
+    branches:
+      - master
+  pull_request:
+jobs:
+  editorconfig:
+    name: Editorconfig
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Install editorconfig-checker
+        run: |
+          gh release download --pattern "*linux-amd64.tar.gz" --dir /tmp
+          tar --extract --gzip --strip-components 1 --file /tmp/ec-linux-amd64.tar.gz --directory /tmp
+          chmod +x /tmp/ec-linux-amd64
+          mv /tmp/ec-linux-amd64 /usr/local/bin/ec
+        env:
+          GH_REPO: editorconfig-checker/editorconfig-checker
+          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+
+      - name: Run editorconfig-checker
+        run: |
+          ec
+
+  dockerfile:
+    name: Dockerfile
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Check for Dockerfile files
+        id: check_dockerfile
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "**/Dockerfile*"
+
+      - name: Install hadolint
+        if: steps.check_dockerfile.outputs.files_exists == 'true'
+        run: |
+          gh release download --pattern "*Linux-x86_64" --dir /tmp
+          chmod +x /tmp/hadolint-Linux-x86_64
+          mv /tmp/hadolint-Linux-x86_64 /usr/local/bin/hadolint
+        env:
+          GH_REPO: hadolint/hadolint
+          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+
+      - name: Run hadolint
+        if: steps.check_dockerfile.outputs.files_exists == 'true'
+        run: |
+          find . -name "Dockerfile*" -not -name "Dockerfile.j2" -not -path "*/ansible_collections/*" -print0 | xargs -0 -I{} hadolint "{}"
+
+  shell:
+    name: Shell
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Check for Shell files
+        id: check_shell
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "**/*.sh"
+
+      - name: Install shellcheck
+        if: steps.check_shell.outputs.files_exists == 'true'
+        run: |
+          gh release download --pattern "*linux.x86_64.tar.xz" --dir /tmp
+          tar --extract --xz --strip-components 1 --file /tmp/shellcheck-*.linux.x86_64.tar.xz --directory /tmp
+          chmod +x /tmp/shellcheck
+          mv /tmp/shellcheck /usr/local/bin/shellcheck
+        env:
+          GH_REPO: koalaman/shellcheck
+          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+
+      - name: Run shellcheck
+        if: steps.check_shell.outputs.files_exists == 'true'
+        run: |
+          find . -name "*.sh" -not -path "*/ansible_collections/*" -print0 | xargs -0 -I{} shellcheck --external-sources "{}"
+
+  yaml:
+    name: YAML
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Check for YAML files
+        id: check_yaml
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "**/*.yml"
+
+      - name: Install yamllint
+        if: steps.check_yaml.outputs.files_exists == 'true'
+        run: |
+          pip3 install --disable-pip-version-check yamllint
+
+      - name: Run yamllint
+        if: steps.check_yaml.outputs.files_exists == 'true'
+        run: |
+          yamllint --strict .
+
+  python:
+    name: Python
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Check for Python files
+        id: check_python
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "**/*.py"
+
+      - name: Install flake8
+        if: steps.check_python.outputs.files_exists == 'true'
+        run: |
+          pip3 install --disable-pip-version-check flake8
+
+      - name: Run flake8
+        if: steps.check_python.outputs.files_exists == 'true'
+        run: |
+          flake8 --show-source .
+
+      - name: Install isort
+        if: steps.check_python.outputs.files_exists == 'true'
+        run: |
+          pip3 install --disable-pip-version-check isort[colors]
+
+      - name: Run isort
+        if: steps.check_python.outputs.files_exists == 'true'
+        run: |
+          isort . --check-only --diff --color
+
+      - name: Check for Tox file
+        id: check_tox
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "tox.ini"
+
+      - name: Install tox
+        if: steps.check_tox.outputs.files_exists == 'true'
+        run: |
+          pip3 install --disable-pip-version-check tox
+
+      - name: Install test dependencies
+        if: steps.check_tox.outputs.files_exists == 'true'
+        run: |
+          make dev-requirements
+
+      - name: Run tox
+        if: steps.check_tox.outputs.files_exists == 'true'
+        run: |
+          tox
+
+  ansible:
+    name: Ansible
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Check for Ansible files
+        id: check_ansible
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "tasks, meta"
+
+      - name: Set up Python 3.x
+        if: steps.check_ansible.outputs.files_exists == 'true'
+        uses: actions/setup-python@v5
+        with:
+          python-version: '3.x'
+
+      - name: Install ansible
+        if: steps.check_ansible.outputs.files_exists == 'true'
+        run: |
+          pip3 install --disable-pip-version-check ansible
+
+      - name: Install ansible-lint
+        if: steps.check_ansible.outputs.files_exists == 'true'
+        run: |
+          pip3 install --disable-pip-version-check ansible-lint
+
+      - name: Run ansible-lint
+        if: steps.check_ansible.outputs.files_exists == 'true'
+        run: |
+          ansible-lint --force-color .
+
+      - name: Check for Molecule files
+        id: check_molecule
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "molecule"
+
+      - name: Install molecule
+        if: steps.check_molecule.outputs.files_exists == 'true'
+        run: |
+          pip3 install --disable-pip-version-check molecule molecule-plugins[docker] pytest-testinfra
+
+      - name: Run molecule
+        if: steps.check_molecule.outputs.files_exists == 'true'
+        run: |
+          molecule test --all
+
+  docker-compose:
+    name: Docker-Compose
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Check for Docker-Compose test file
+        id: check_docker_compose_test
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "docker-compose.test.yml"
+
+      - name: Run docker-compose test
+        if: steps.check_docker_compose_test.outputs.files_exists == 'true'
+        run: |
+          docker compose --file docker-compose.test.yml build
+
+  go:
+    name: Go
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+
+      - name: Check for Go files
+        id: check_go
+        uses: andstor/file-existence-action@v2
+        with:
+          files: "**/*.go"
+
+      - name: Set up Go
+        if: steps.check_go.outputs.files_exists == 'true'
+        uses: actions/setup-go@v5
+        with:
+          go-version: 'stable'
+
+      - name: Run go vet
+        if: steps.check_go.outputs.files_exists == 'true'
+        run: |
+          go vet ./...
+
+      - name: Run go test
+        if: steps.check_go.outputs.files_exists == 'true'
+        run: |
+          go test -v -cover ./...
+
+      - name: Install staticcheck
+        if: steps.check_go.outputs.files_exists == 'true'
+        run: |
+          gh release download --pattern "*linux_amd64.tar.gz" --dir /tmp
+          tar --extract --gzip --strip-components 1 --file /tmp/staticcheck_linux_amd64.tar.gz --directory /tmp
+          chmod +x /tmp/staticcheck
+          mv /tmp/staticcheck /usr/local/bin/staticcheck
+        env:
+          GH_REPO: dominikh/go-tools
+          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+
+      - name: Run staticcheck
+        if: steps.check_go.outputs.files_exists == 'true'
+        run: |
+          staticcheck
diff --git a/.gitignore b/.gitignore
index 1b78494..111b3d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
 .DS_Store
 Thumbs.db
 public/
+sitespeed-result/
+.hugo_build.lock
diff --git a/.yamllint b/.yamllint
new file mode 100644
index 0000000..1e4cd8c
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,9 @@
+extends: default
+
+rules:
+  comments:
+    min-spaces-from-content: 1
+  comments-indentation: false
+  document-start:
+    present: false
+  line-length: false
diff --git a/lighthouserc.json b/lighthouserc.json
deleted file mode 100644
index 13c9c25..0000000
--- a/lighthouserc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-    "ci": {
-      "collect": {
-        "staticDistDir": "./exampleSite/public"
-      }
-    }
-  }
diff --git a/tests/exampleSiteWithImage/budget.json b/tests/exampleSiteWithImage/budget.json
new file mode 100644
index 0000000..2917d78
--- /dev/null
+++ b/tests/exampleSiteWithImage/budget.json
@@ -0,0 +1,18 @@
+{
+    "budget": {
+        "requests": {
+            "total": 9
+        },
+        "transferSize": {
+            "total": 321024
+        },
+        "thirdParty": {
+            "requests": 4
+        },
+        "score": {
+            "bestpractice": 93,
+            "privacy": 72,
+            "performance": 86
+        }
+    }
+}
diff --git a/exampleSite/config.toml b/tests/exampleSiteWithImage/config.toml
similarity index 98%
copy from exampleSite/config.toml
copy to tests/exampleSiteWithImage/config.toml
index ca61111..0fb0a40 100644
--- a/exampleSite/config.toml
+++ b/tests/exampleSiteWithImage/config.toml
@@ -13,7 +13,7 @@
 googleAnalytics = ""
 
 # Copyright
-copyright = "&copy;2021 Your Name"
+copyright = "&copy;2024 Your Name"
 
 [params]
 
diff --git a/exampleSite/content/_index.md b/tests/exampleSiteWithImage/content/_index.md
similarity index 100%
rename from exampleSite/content/_index.md
rename to tests/exampleSiteWithImage/content/_index.md
diff --git a/exampleSite/content/ipsum-in.md b/tests/exampleSiteWithImage/content/ipsum-in.md
similarity index 100%
rename from exampleSite/content/ipsum-in.md
rename to tests/exampleSiteWithImage/content/ipsum-in.md
diff --git a/exampleSite/content/luctus-urna.md b/tests/exampleSiteWithImage/content/luctus-urna.md
similarity index 100%
rename from exampleSite/content/luctus-urna.md
rename to tests/exampleSiteWithImage/content/luctus-urna.md
diff --git a/exampleSite/content/purus-sem.md b/tests/exampleSiteWithImage/content/purus-sem.md
similarity index 100%
rename from exampleSite/content/purus-sem.md
rename to tests/exampleSiteWithImage/content/purus-sem.md
diff --git a/tests/exampleSiteWithImage/docker-compose.yml b/tests/exampleSiteWithImage/docker-compose.yml
new file mode 100644
index 0000000..5f544ba
--- /dev/null
+++ b/tests/exampleSiteWithImage/docker-compose.yml
@@ -0,0 +1,20 @@
+services:
+  hugo:
+    image: hugomods/hugo:latest
+    volumes:
+      - type: bind
+        source: ../../../
+        target: /src
+    command: ["hugo", "server", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithImage", "--themesDir=/src"]
+    ports:
+      - "1313:1313"
+
+  sitespeed:
+    image: sitespeedio/sitespeed.io:latest
+    volumes:
+      - type: bind
+        source: .
+        target: /sitespeed.io
+    depends_on:
+      - hugo
+    command: ["http://hugo:1313/index.html", "--budget.configPath=budget.json"]
diff --git a/exampleSite/static/css/style.css b/tests/exampleSiteWithImage/static/css/style.css
similarity index 100%
rename from exampleSite/static/css/style.css
rename to tests/exampleSiteWithImage/static/css/style.css
diff --git a/exampleSite/static/favicon.ico b/tests/exampleSiteWithImage/static/favicon.ico
similarity index 100%
rename from exampleSite/static/favicon.ico
rename to tests/exampleSiteWithImage/static/favicon.ico
Binary files differ
diff --git a/exampleSite/static/images/background.jpg b/tests/exampleSiteWithImage/static/images/background.jpg
similarity index 100%
rename from exampleSite/static/images/background.jpg
rename to tests/exampleSiteWithImage/static/images/background.jpg
Binary files differ
diff --git a/exampleSite/static/images/social.jpg b/tests/exampleSiteWithImage/static/images/social.jpg
similarity index 100%
rename from exampleSite/static/images/social.jpg
rename to tests/exampleSiteWithImage/static/images/social.jpg
Binary files differ
diff --git a/exampleSite/static/videos/background.mp4 b/tests/exampleSiteWithImage/static/videos/background.mp4
similarity index 100%
rename from exampleSite/static/videos/background.mp4
rename to tests/exampleSiteWithImage/static/videos/background.mp4
Binary files differ
diff --git a/tests/exampleSiteWithVideo/budget.json b/tests/exampleSiteWithVideo/budget.json
new file mode 100644
index 0000000..2f2dc53
--- /dev/null
+++ b/tests/exampleSiteWithVideo/budget.json
@@ -0,0 +1,18 @@
+{
+    "budget": {
+        "requests": {
+            "total": 9
+        },
+        "transferSize": {
+            "total": 2048000
+        },
+        "thirdParty": {
+            "requests": 4
+        },
+        "score": {
+            "bestpractice": 93,
+            "privacy": 72,
+            "performance": 84
+        }
+    }
+}
diff --git a/exampleSite/config.toml b/tests/exampleSiteWithVideo/config.toml
similarity index 98%
rename from exampleSite/config.toml
rename to tests/exampleSiteWithVideo/config.toml
index ca61111..93da311 100644
--- a/exampleSite/config.toml
+++ b/tests/exampleSiteWithVideo/config.toml
@@ -13,7 +13,7 @@
 googleAnalytics = ""
 
 # Copyright
-copyright = "&copy;2021 Your Name"
+copyright = "&copy;2024 Your Name"
 
 [params]
 
@@ -31,13 +31,13 @@
 
     # Image
     [params.visual.image]
-      enable = true
+      enable = false
       file = "images/background.jpg"
       position = "center center"
 
     # Video
     [params.visual.video]
-      enable = false
+      enable = true
       mute = true
       file = "videos/background.mp4"
       # youtubeId = "dk9uNWPP7EA"
diff --git a/exampleSite/content/_index.md b/tests/exampleSiteWithVideo/content/_index.md
similarity index 100%
copy from exampleSite/content/_index.md
copy to tests/exampleSiteWithVideo/content/_index.md
diff --git a/exampleSite/content/ipsum-in.md b/tests/exampleSiteWithVideo/content/ipsum-in.md
similarity index 100%
copy from exampleSite/content/ipsum-in.md
copy to tests/exampleSiteWithVideo/content/ipsum-in.md
diff --git a/exampleSite/content/luctus-urna.md b/tests/exampleSiteWithVideo/content/luctus-urna.md
similarity index 100%
copy from exampleSite/content/luctus-urna.md
copy to tests/exampleSiteWithVideo/content/luctus-urna.md
diff --git a/exampleSite/content/purus-sem.md b/tests/exampleSiteWithVideo/content/purus-sem.md
similarity index 100%
copy from exampleSite/content/purus-sem.md
copy to tests/exampleSiteWithVideo/content/purus-sem.md
diff --git a/tests/exampleSiteWithVideo/docker-compose.yml b/tests/exampleSiteWithVideo/docker-compose.yml
new file mode 100644
index 0000000..5c900cd
--- /dev/null
+++ b/tests/exampleSiteWithVideo/docker-compose.yml
@@ -0,0 +1,20 @@
+services:
+  hugo:
+    image: hugomods/hugo:latest
+    volumes:
+      - type: bind
+        source: ../../../
+        target: /src
+    command: ["hugo", "server", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithVideo", "--themesDir=/src"]
+    ports:
+      - "1313:1313"
+
+  sitespeed:
+    image: sitespeedio/sitespeed.io:latest
+    volumes:
+      - type: bind
+        source: .
+        target: /sitespeed.io
+    depends_on:
+      - hugo
+    command: ["http://hugo:1313/index.html", "--budget.configPath=budget.json"]
diff --git a/exampleSite/static/css/style.css b/tests/exampleSiteWithVideo/static/css/style.css
similarity index 100%
copy from exampleSite/static/css/style.css
copy to tests/exampleSiteWithVideo/static/css/style.css
diff --git a/exampleSite/static/favicon.ico b/tests/exampleSiteWithVideo/static/favicon.ico
similarity index 100%
copy from exampleSite/static/favicon.ico
copy to tests/exampleSiteWithVideo/static/favicon.ico
Binary files differ
diff --git a/exampleSite/static/images/background.jpg b/tests/exampleSiteWithVideo/static/images/background.jpg
similarity index 100%
copy from exampleSite/static/images/background.jpg
copy to tests/exampleSiteWithVideo/static/images/background.jpg
Binary files differ
diff --git a/exampleSite/static/images/social.jpg b/tests/exampleSiteWithVideo/static/images/social.jpg
similarity index 100%
copy from exampleSite/static/images/social.jpg
copy to tests/exampleSiteWithVideo/static/images/social.jpg
Binary files differ
diff --git a/exampleSite/static/videos/background.mp4 b/tests/exampleSiteWithVideo/static/videos/background.mp4
similarity index 100%
copy from exampleSite/static/videos/background.mp4
copy to tests/exampleSiteWithVideo/static/videos/background.mp4
Binary files differ

--
Gitblit v1.10.0