Skip to content

Make sure roles are runnable in clean environment #18

Make sure roles are runnable in clean environment

Make sure roles are runnable in clean environment #18

Workflow file for this run

name: Test Installation
on:
pull_request:
branches:
- master
- staging
push:
branches:
- master
- staging
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-20.04
env:
app_load_timeout_s: 5
screenshot_timeout_s: 10
strategy:
matrix:
role:
[
{
name: "filebrowser",
tags: "system,docker,storage",
screenshot_url: "http://localhost:8081",
},
{
name: "transmission",
tags: "system,docker,media",
screenshot_url: "http://localhost:9091",
},
{
name: "prowlarr",
tags: "system,docker,media",
screenshot_url: "http://localhost:9696",
},
{
name: "radarr",
tags: "system,docker,media",
screenshot_url: "http://localhost:7878",
},
{
name: "sonarr",
tags: "system,docker,media",
screenshot_url: "http://localhost:8989",
},
{
name: "jellyfin",
tags: "system,docker,media",
screenshot_url: "http://localhost:8096",
},
{
name: "jellyseerr",
tags: "system,docker,media",
screenshot_url: "http://localhost:5055",
},
{
name: "immich",
tags: "system,docker,media",
screenshot_url: "http://localhost:3001",
},
{
name: "paperlessngx",
tags: "system,docker,media",
screenshot_url: "http://localhost:9898",
},
{
name: "homeassistant",
tags: "system,docker,smarthome",
screenshot_url: "http://localhost:8123",
},
{
name: "miniflux",
tags: "system,docker,rss",
screenshot_url: "http://localhost:8082",
},
{
name: "rssbridge",
tags: "system,docker,rss",
screenshot_url: "http://localhost:8083",
},
{
name: "homebox",
tags: "system,docker,homebox",
screenshot_url: "http://localhost:7745",
},
{
name: "vaultwarden",
tags: "system,docker,vaultwarden",
screenshot_url: "http://localhost:4430",
},
{
name: "wallos",
tags: "system,docker,wallos",
screenshot_url: "http://localhost:8282",
},
{
name: "duplicati",
tags: "system,docker,duplicati",
screenshot_url: "http://localhost:8200",
},
]
steps:
- uses: actions/checkout@v4
- name: Install deploy keys for ansible-collection-selfhosted
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.GH_DEPLOYKEY_ANSIBLE_COLLECTION_SELFHOSTED }}
${{ secrets.GH_DEPLOYKEY_ANSIBLE_COLLECTION_SMARTHOME }}
${{ secrets.GH_DEPLOYKEY_ANSIBLE_COLLECTION_YAMS }}
- name: Install dependencies from requirements.yml
run: ansible-galaxy install -r requirements.yml
- name: Run ${{ matrix.role.tags }} role
run: |
ansible-playbook playbook-pi.yml \
--limit ci \
--vault-password-file vault.ci.sh \
--tags ${{ matrix.role.tags }} \
-v
- name: Sleep before loading app
run: sleep ${{ env.app_load_timeout_s }}
- name: Print docker processes
run: docker ps -a
- name: Make a screenshot
uses: karol-brejna-i/webpage-screenshot-action@v1
with:
url: ${{ matrix.role.screenshot_url }}
scriptBefore: |
var waitTill = new Date(new Date().getTime() + ${{ env.screenshot_timeout_s }} * 1000);
while(waitTill > new Date()){}
output: "screenshot-${{ matrix.role.name }}.png"
- name: Upload screenshots
uses: actions/upload-artifact@v3
with:
name: screenshots
path: ${{ github.workspace }}/screenshot-*.png