From 8078e0ec7279916e56bdc8bab88ee7f1e1594425 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 23 Feb 2024 06:18:56 -0500 Subject: Package scripts update (#714) * Update license-report commands * Rename build-libs * Update test-lint-js * Rename test-lint-json * Update test-lint-css * Rename test-lint-html * Update test-ts * Update test-code * Update test-build * Rename * Test JSON types * Distinguish JS tests from JSON tests * Add bench test * Test markdown * Add fast test option * Rename test:code * Describe scripts * Add test-build action * Add test:static-analysis * Update CI * Fix path * Fix missing type definition --- .github/workflows/bench.yml | 2 +- .github/workflows/broken-links.yml | 2 +- .github/workflows/ci.yml | 99 +++++++++++++++++--------- .github/workflows/create-prerelease-on-tag.yml | 2 +- 4 files changed, 69 insertions(+), 36 deletions(-) (limited to '.github') diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 775e94a7..004e806b 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -22,7 +22,7 @@ jobs: run: npm ci - name: Build Libs - run: npm run build-libs + run: npm run build:libs - name: Run Benchmarks uses: CodSpeedHQ/action@v2 diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 4cea3b06..b5d296ea 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: npm ci - name: Build Legal - run: npm run license-report + run: npm run license-report:html - uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a with: fail: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea42aab4..a9c56cdc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,72 @@ on: merge_group: jobs: - test: + static-analysis: + name: Static Analysis runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version-file: "package.json" + + - name: Install dependencies + run: npm ci + + - name: Build third-party libraries + run: npm run build:libs + + - name: Run static analysis tests + run: npm run test:static-analysis + + static-analysis-json: + name: Static Analysis (JSON) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version-file: "package.json" + + - name: Install dependencies + run: npm ci + + - name: Build third-party libraries + run: npm run build:libs + + - name: Run static analysis tests + run: npm run test:json + + unit-tests: + name: Unit Tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version-file: "package.json" + + - name: Install dependencies + run: npm ci + + - name: Build third-party libraries + run: npm run build:libs + + - name: Run unit tests + run: npm run test:unit + + test-build: + name: Test Build + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -26,40 +89,10 @@ jobs: run: npm ci - name: Build Libs - run: npm run build-libs - - - name: Lint JS - run: npm run test-lint-js - env: - CI: true - - - name: Validate JS Types - run: npm run test-ts - env: - CI: true - - - name: Lint CSS - run: npm run test-lint-css - env: - CI: true - - - name: Lint HTML - run: npm run test-lint-html - env: - CI: true - - - name: Tests - run: npm run test-code - env: - CI: true - - - name: Test JSON - run: npm run test-json - env: - CI: true + run: npm run build:libs - name: Build Legal - run: npm run license-report + run: npm run license-report:html - name: Build run: npm run build diff --git a/.github/workflows/create-prerelease-on-tag.yml b/.github/workflows/create-prerelease-on-tag.yml index 6f82a85e..884d7902 100644 --- a/.github/workflows/create-prerelease-on-tag.yml +++ b/.github/workflows/create-prerelease-on-tag.yml @@ -26,7 +26,7 @@ jobs: run: npm ci - name: Build Legal - run: npm run license-report + run: npm run license-report:html - name: Build run: npm run-script build -- --all --version ${{ github.ref_name }} -- cgit v1.2.3