Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

πŸ‘· More complete PR CI checks

Alicia Sykes159307f1a3ec
diff --git a/.github/workflows/pr-quality-check.yml b/.github/workflows/ci.yml
similarity index 52%
rename from .github/workflows/pr-quality-check.yml
rename to .github/workflows/ci.yml
index 60fd2490..ef384b6e 100644
--- a/.github/workflows/pr-quality-check.yml
+++ b/.github/workflows/ci.yml
@@ -1,151 +1,179 @@
-name: πŸ” PR Quality Check
-
-on:
- pull_request:
- branches: ['master', 'develop']
- paths-ignore:
- - '**.md'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-jobs:
- changes:
- name: πŸ”Ž Detect Changes
- runs-on: ubuntu-latest
- outputs:
- lockfile: ${{ steps.filter.outputs.lockfile }}
- steps:
- - name: πŸ›ŽοΈ Checkout Code
- uses: actions/checkout@v6
-
- - name: πŸ”Ž Filter Paths
- uses: dorny/paths-filter@v3
- id: filter
- with:
- filters: |
- lockfile:
- - 'yarn.lock'
-
- lint:
- name: πŸ“ Lint Code
- runs-on: ubuntu-latest
- steps:
- - name: πŸ›ŽοΈ Checkout Code
- uses: actions/checkout@v6
-
- - name: πŸ”§ Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: '20'
- cache: 'yarn'
-
- - name: πŸ“¦ Install Dependencies
- run: yarn install --frozen-lockfile
-
- - name: πŸ” Run ESLint
- run: yarn lint
-
- typecheck:
- name: 🧷 Type Check
- runs-on: ubuntu-latest
- steps:
- - name: πŸ›ŽοΈ Checkout Code
- uses: actions/checkout@v6
-
- - name: πŸ”§ Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: '20'
- cache: 'yarn'
-
- - name: πŸ“¦ Install Dependencies
- run: yarn install --frozen-lockfile
-
- - name: 🧷 Run vue-tsc
- run: yarn typecheck
-
- test:
- name: πŸ§ͺ Run Tests
- runs-on: ubuntu-latest
- steps:
- - name: πŸ›ŽοΈ Checkout Code
- uses: actions/checkout@v6
-
- - name: πŸ”§ Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: '20'
- cache: 'yarn'
-
- - name: πŸ“¦ Install Dependencies
- run: yarn install --frozen-lockfile
-
- - name: πŸ§ͺ Run Tests
- run: yarn test
-
- build:
- name: πŸ—οΈ Build Application
- runs-on: ubuntu-latest
- steps:
- - name: πŸ›ŽοΈ Checkout Code
- uses: actions/checkout@v6
-
- - name: πŸ”§ Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: '20'
- cache: 'yarn'
-
- - name: πŸ“¦ Install Dependencies
- run: yarn install --frozen-lockfile
-
- - name: πŸ—οΈ Build Project
- run: yarn build
-
- - name: βœ… Verify Build Output
- run: |
- if [ ! -d "dist" ]; then
- echo "❌ Build failed: dist directory not created"
- exit 1
- fi
- if [ ! -f "dist/index.html" ]; then
- echo "❌ Build failed: index.html not found"
- exit 1
- fi
- echo "βœ… Build successful"
-
- docker-smoke:
- name: 🐳 Docker Smoke Test
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - name: πŸ›ŽοΈ Checkout Code
- uses: actions/checkout@v6
-
- - name: 🐳 Build & Test Docker Image
- run: sh tests/docker-smoke-test.sh
- timeout-minutes: 10
-
- security:
- name: πŸ”’ Security Audit
- runs-on: ubuntu-latest
- needs: changes
- if: needs.changes.outputs.lockfile == 'true'
- continue-on-error: true
- steps:
- - name: πŸ›ŽοΈ Checkout Code
- uses: actions/checkout@v6
-
- - name: πŸ”§ Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: '20'
- cache: 'yarn'
-
- - name: πŸ“¦ Install Dependencies
- run: yarn install --frozen-lockfile
-
- - name: πŸ”’ Run Security Audit
- run: yarn audit --level high
+# CI checks to run when PR is opened
+name: 🚦 PR Check
+
+on:
+ pull_request:
+ branches: ['master', 'develop']
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ changes:
+ name: πŸ”Ž Detect Changes
+ runs-on: ubuntu-latest
+ outputs:
+ lockfile: ${{ steps.filter.outputs.lockfile }}
+ workflows: ${{ steps.filter.outputs.workflows }}
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Filter Paths
+ uses: dorny/paths-filter@v4
+ id: filter
+ with:
+ filters: |
+ lockfile:
+ - 'yarn.lock'
+ workflows:
+ - '.github/workflows/**'
+
+ lint:
+ name: πŸ›‘οΈ Lint
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: '20'
+ cache: 'yarn'
+
+ - name: Install Dependencies
+ run: yarn install --frozen-lockfile
+
+ - name: Run ESLint
+ run: yarn lint
+
+ typecheck:
+ name: 🦴 Typecheck
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: '20'
+ cache: 'yarn'
+
+ - name: Install Dependencies
+ run: yarn install --frozen-lockfile
+
+ - name: Run vue-tsc
+ run: yarn typecheck
+
+ test:
+ name: πŸ§ͺ Test
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: '20'
+ cache: 'yarn'
+
+ - name: Install Dependencies
+ run: yarn install --frozen-lockfile
+
+ - name: Run Tests
+ run: yarn test
+
+ build:
+ name: πŸ—οΈ Build Check
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: '20'
+ cache: 'yarn'
+
+ - name: Install Dependencies
+ run: yarn install --frozen-lockfile
+
+ - name: Build Project
+ run: yarn build
+
+ - name: Verify Build Output
+ run: |
+ if [ ! -d "dist" ]; then
+ echo "❌ Build failed: dist directory not created"
+ exit 1
+ fi
+ if [ ! -f "dist/index.html" ]; then
+ echo "❌ Build failed: index.html not found"
+ exit 1
+ fi
+ echo "βœ… Build successful"
+
+ docker-smoke:
+ name: 🐳 Docker Smoke Test
+ runs-on: ubuntu-latest
+ continue-on-error: true
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Build & Test Docker Image
+ run: sh tests/docker-smoke-test.sh
+ timeout-minutes: 10
+
+ dependency-review:
+ name: πŸ”’ Dependency Audit
+ runs-on: ubuntu-latest
+ needs: changes
+ if: needs.changes.outputs.lockfile == 'true'
+ permissions:
+ contents: read
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Review Dependencies
+ uses: actions/dependency-review-action@v4
+ with:
+ fail-on-severity: moderate
+
+ secret-scan:
+ name: πŸ”‘ Secret Scanning
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - name: Scan PR Diff for Secrets
+ uses: trufflesecurity/[email protected]
+ with:
+ base: ${{ github.event.pull_request.base.sha }}
+ head: ${{ github.event.pull_request.head.sha }}
+ extra_args: --only-verified --fail
+
+ actionlint:
+ name: πŸ› οΈ Lint Actions
+ runs-on: ubuntu-latest
+ needs: changes
+ if: needs.changes.outputs.workflows == 'true'
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Run Actionlint
+ uses: raven-actions/actionlint@v2
+ with:
+ fail-on-error: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5b1c3f70..2c89f521 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -112,7 +112,7 @@ jobs:
run: |
set -euo pipefail
git fetch --tags --force
- PREV=$({ echo "$CURRENT_TAG"; git tag | grep -E '^[0-9]+\.[0-9]+\.0$'; } \
+ PREV=$({ echo "$CURRENT_TAG"; git tag | grep -E '^[0-9]+\.[0-9]+\.0$' || true; } \
| sort -uV \
| awk -v cur="$CURRENT_TAG" '$0 == cur { print prev; exit } { prev = $0 }')
echo "tag=$PREV" >> "$GITHUB_OUTPUT"