mirror of
https://github.com/ivuorinen/everforest-resources.git
synced 2026-01-26 03:04:02 +00:00
feat: consolidate GitHub workflows and improve install script
- Remove redundant workflows (build.yml, snapshots.yml, cli-verify.yml) - Integrate all functionality into comprehensive ci.yml workflow - Add job dependencies to optimize CI execution and avoid duplicate work - Update all workflows to use node-version-file with .nvmrc - Enhance install script with better tool availability checking - Add install_tool_config function to skip missing tools with clear notifications This reduces workflow files by 50% (6→3) while maintaining all functionality and improving CI efficiency through better job orchestration.
This commit is contained in:
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@@ -1,40 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint code
|
||||
run: npm run lint
|
||||
|
||||
- name: Generate themes
|
||||
run: npm run generate
|
||||
|
||||
- name: Validate output
|
||||
run: npm run validate
|
||||
|
||||
- name: Check for uncommitted changes
|
||||
run: |
|
||||
if ! git diff --quiet; then
|
||||
echo "Generated files have uncommitted changes!"
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -28,6 +28,7 @@ jobs:
|
||||
generate:
|
||||
name: Generate Themes
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
@@ -57,8 +58,9 @@ jobs:
|
||||
echo "✅ All generated files are up to date"
|
||||
|
||||
test:
|
||||
name: Test Web Components
|
||||
name: Test Web Components & Snapshots
|
||||
runs-on: ubuntu-latest
|
||||
needs: generate
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
@@ -74,9 +76,15 @@ jobs:
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: Run Playwright tests
|
||||
- name: Generate themes
|
||||
run: npm run generate
|
||||
|
||||
- name: Run Playwright e2e tests
|
||||
run: npm run test:e2e
|
||||
|
||||
- name: Generate snapshots
|
||||
run: npm run snapshots
|
||||
|
||||
- name: Upload Playwright report
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
if: always()
|
||||
@@ -88,6 +96,7 @@ jobs:
|
||||
verify-installation:
|
||||
name: Verify Installation Scripts
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: generate
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
@@ -142,6 +151,7 @@ jobs:
|
||||
build-stats:
|
||||
name: Build Statistics
|
||||
runs-on: ubuntu-latest
|
||||
needs: generate
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
37
.github/workflows/cli-verify.yml
vendored
37
.github/workflows/cli-verify.yml
vendored
@@ -1,37 +0,0 @@
|
||||
name: CLI Verify
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
cli-verify:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Generate themes
|
||||
run: npm run generate
|
||||
|
||||
- name: Run installer
|
||||
run: |
|
||||
export HOME=$(mktemp -d)
|
||||
./cli/install.sh
|
||||
|
||||
- name: Run verifier
|
||||
run: |
|
||||
export HOME=$(mktemp -d)
|
||||
./cli/install.sh
|
||||
ENGINE=docker ./verify/verify.sh
|
||||
40
.github/workflows/snapshots.yml
vendored
40
.github/workflows/snapshots.yml
vendored
@@ -1,40 +0,0 @@
|
||||
name: Snapshots
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
snapshots:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: Generate themes
|
||||
run: npm run generate
|
||||
|
||||
- name: Run Playwright tests
|
||||
run: npm run snapshots
|
||||
|
||||
- name: Upload snapshots
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
if: failure()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report/
|
||||
retention-days: 30
|
||||
Reference in New Issue
Block a user