Skip to content

Commit

Permalink
test: ✅ speed up tests
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Nemchik <[email protected]>
  • Loading branch information
nemchik committed Sep 21, 2023
1 parent f34e8e3 commit 94b701b
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 50 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/application-request.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Application Request
about: Suggest a new application to be added to the DockSTARTer repository
title: '[Application Request]'
labels: 'apps, docs, enhancement'
assignees: ''
title: "[Application Request]"
labels: "apps, docs, enhancement"
assignees: ""
---

# Name of the application
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG]'
labels: 'bug'
assignees: ''

title: "[BUG]"
labels: "bug"
assignees: ""
---

# Bug report
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[Feature Request]'
labels: 'enhancement'
assignees: ''

title: "[Feature Request]"
labels: "enhancement"
assignees: ""
---

# Feature request
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Build mkdocs and deploy to GitHub Pages
on: [push, pull_request]

jobs:

build:
name: Build docs
runs-on: ubuntu-latest
Expand All @@ -27,7 +26,7 @@ jobs:
steps:
- uses: actions/[email protected]
with:
fetch-depth: '0'
fetch-depth: "0"
- uses: actions/[email protected]
with:
python-version: 3.x
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on: [pull_request_target]

jobs:
label:

runs-on: ubuntu-latest

steps:
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
run: |
docker run --rm \
-v "${GITHUB_WORKSPACE}":/check \
-u "$(id -u):$(id -g)" \
mstruebing/editorconfig-checker
markdownlint:
Expand All @@ -20,12 +19,12 @@ jobs:
- uses: actions/[email protected]
- name: markdownlint
run: |
find "${GITHUB_WORKSPACE}" -name '*.md' -exec \
docker run --rm \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
markdownlint/markdownlint \
-r ~MD007,~MD013,~MD033,~MD034 \
{} +
docker run --rm \
-v "${GITHUB_WORKSPACE}":/workdir \
ghcr.io/igorshubovych/markdownlint-cli \
--ignore "docs/index.md" \
--disable MD013 MD033 -- \
"**/*.md"
shellcheck:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,9 +57,9 @@ jobs:
- uses: actions/[email protected]
- name: yamllint
run: |
find "${GITHUB_WORKSPACE}" -name '*.yaml' -o -name '*.yml' -exec \
docker run --rm \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
peterdavehello/yamllint \
yamllint -d '{"extends":"default","rules":{"document-start":{"present":false},"line-length":"disable","truthy":{"check-keys":false}}}' \
{} +
docker run --rm \
-v "${PWD}":/yaml \
peterdavehello/yamllint \
yamllint \
-d '{"extends":"default","rules":{"document-start":{"present":false},"line-length":"disable","truthy":{"check-keys":false}}}' \
"."
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
stale-pr-label: "no-pr-activity"
days-before-stale: 90
days-before-close: 15
exempt-issue-labels: 'under-consideration,work-in-progress'
exempt-pr-labels: 'under-consideration,work-in-progress'
exempt-issue-labels: "under-consideration,work-in-progress"
exempt-pr-labels: "under-consideration,work-in-progress"
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Run Tests
on: [push, pull_request]

jobs:

run:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
31 changes: 19 additions & 12 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ jobs:
- uses: actions/[email protected]
- name: Validate Documentation
run: |
dirname -- $(grep -Rl 'deprecated: "true"' compose/) | xargs rm -rf
for image in $(ls compose/.apps/); do
if ! ls -d docs/apps/* | grep -q "docs/apps/${image}.md"; then
echo "Missing documentation for ${image}"
for APPFOLDER in compose/.apps/*; do
APPNAME=$(basename "${APPFOLDER}")
APPDEPRECATED=$(grep --color=never -Po "\scom\.dockstarter\.appinfo\.deprecated: \K.*" "compose/.apps/${APPNAME}/${APPNAME}.labels.yml" | sed -E 's/^([^"].*[^"])$/"\1"/' | xargs || echo false)
if [[ ${APPDEPRECATED} == true ]]; then
continue
fi
if [[ ! -f "docs/apps/${APPNAME}.md" ]]; then
echo "Missing documentation for ${APPNAME}"
exit 1
fi
if ! grep -q "apps/${image}.md" mkdocs.yml; then
echo "Missing link for ${image}"
if ! grep -q "apps/${APPNAME}.md" mkdocs.yml; then
echo "Missing link for ${APPNAME}"
exit 1
fi
done
Expand All @@ -27,11 +31,14 @@ jobs:
- uses: actions/[email protected]
- name: Validate Images
run: |
dirname -- $(grep -Rl 'deprecated: "true"' compose/) | xargs rm -rf
for image in $(grep -RPoh "image: \K.*" compose/ | sort -u | grep -v '${'); do
echo "Image: ${image}"
if [[ ${image} != *":"* ]]; then
image="${image}:latest"
for APPFOLDER in compose/.apps/*; do
APPNAME=$(basename "${APPFOLDER}")
APPDEPRECATED=$(grep --color=never -Po "\scom\.dockstarter\.appinfo\.deprecated: \K.*" "compose/.apps/${APPNAME}/${APPNAME}.labels.yml" | sed -E 's/^([^"].*[^"])$/"\1"/' | xargs || echo false)
if [[ ${APPDEPRECATED} == true ]]; then
continue
fi
docker run --rm mplatform/mquery "${image}"
APPIMAGE=$(grep --color=never -Po "\simage: \K.*" "compose/.apps/${APPNAME}/${APPNAME}.x86_64.yml" | sed -E 's/([^:]+):[^:]+/\1/' | xargs || echo false)
APPTAG=$(grep --color=never -Po "\scom\.dockstarter\.appvars\.${APPNAME}_tag: \K.*" "compose/.apps/${APPNAME}/${APPNAME}.labels.yml" | sed -E 's/^([^"].*[^"])$/"\1"/' | xargs || echo false)
echo "Image: ${APPIMAGE}:${APPTAG}"
docker run --rm mplatform/mquery "${APPIMAGE}:${APPTAG}"
done
2 changes: 1 addition & 1 deletion docs/apps/gluetun.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ your `docker-compose.override.yml`.

.env

```
```env
...
TRANSMISSION_NETWORK_MODE="container:gluetun"
...
Expand Down
2 changes: 1 addition & 1 deletion docs/apps/homeassistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ Reference:
To make sure your Home Assistant instance can see your local network devices you might want to set your network mode to `host` on your `.docker/compose/.env` file.

```
```env
HOMEASSISTANT_NETWORK_MODE=host
```
2 changes: 1 addition & 1 deletion docs/apps/homer.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Note that your configuration files and homer assets are located in `${DOCKERCONF

#### HOMER_SUBFOLDER

(default: `''`) If you would like to host Homer in a subfolder, (ex: http://my-domain/homer), set this to the subfolder path (ex /homer).
(default: `''`) If you would like to host Homer in a subfolder, (ex: `http://my-domain/homer`), set this to the subfolder path (ex /homer).
2 changes: 1 addition & 1 deletion docs/apps/rustdesk.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ hbbs is the RustDesk ID/Rendezvous server. hbbr is the RustDesk relay server. Bo

When hbbs is first run, it will generate a public/private key pair for the clients to use. You can see this take place in the logs:

```
```env
INFO [src/common.rs:133] Private/public key written to id_ed25519/id_ed25519.pub
```

Expand Down
8 changes: 4 additions & 4 deletions docs/apps/watchtower.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The default notification library is [Shoutrrr](https://containrrr.dev/shoutrrr/)
| Notification Application | Your DockSTARTer `WATCHTOWER_NOTIFICATION_URL` should follow this: |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [Discord](https://containrrr.dev/shoutrrr/services/discord/) | discord://**token**@**channel** |
| [Email](https://containrrr.dev/shoutrrr/services/overview/) | smtp://**`username`**:**`password`**@**`host`**:**`port`**/?fromAddress=**`fromAddress`**&toAddresses=**`recipient1`**[,__`recipient2`__,...] |
| [Pushover](https://containrrr.dev/shoutrrr/services/pushover/) | pushover://shoutrrr:**`apiToken`**@**`userKey`**/?devices=**`device1`**[,__`device2`__, ...] |
| [Slack](./not-documented.md) | slack://[__`botname`__@]**`token-a`**/**`token-b`**/**`token-c`**\* |
| [Telegram](https://containrrr.dev/shoutrrr/services/telegram/) | telegram://**`token`**@telegram?channels=**`channel-1`**[,__`channel-2`__,...] |
| [Email](https://containrrr.dev/shoutrrr/services/overview/) | smtp://**`username`**:**`password`**@**`host`**:**`port`**/?fromAddress=**`fromAddress`**&toAddresses=**`recipient1`**[,**`recipient2`**,...] |
| [Pushover](https://containrrr.dev/shoutrrr/services/pushover/) | pushover://shoutrrr:**`apiToken`**@**`userKey`**/?devices=**`device1`**[,**`device2`**, ...] |
| [Slack](./not-documented.md) | slack://[**`botname`**@]**`token-a`**/**`token-b`**/**`token-c`**\* |
| [Telegram](https://containrrr.dev/shoutrrr/services/telegram/) | telegram://**`token`**@telegram?channels=**`channel-1`**[,**`channel-2`**,...] |

0 comments on commit 94b701b

Please sign in to comment.