diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 57ca50d2a1..41bc5119be 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -225,7 +225,7 @@ jobs: node-version: '20' - name: ๐ฅ Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: path: all-reports diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index f820167d2f..72f58b80c2 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -23,37 +23,37 @@ jobs: test: name: Run JavaScript Tests runs-on: ubuntu-latest - + strategy: matrix: node-version: [18, 20] - + steps: - name: ๐ Checkout repository uses: actions/checkout@v5 - + - name: ๐ข Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - + - name: ๐ฆ Install dependencies run: | npm ci # Also install optional reporter if needed npm install jest-html-reporter --save-dev || true - + - name: ๐งช Run unit tests run: npm test -- --coverage --ci --maxWorkers=2 env: CI: true - + - name: ๐ Generate coverage report if: matrix.node-version == '20' # Only run coverage on one version run: | npm run test:coverage || true - + - name: ๐ค Upload coverage to Codecov if: matrix.node-version == '20' uses: codecov/codecov-action@v5 @@ -62,7 +62,7 @@ jobs: flags: frontend name: frontend-coverage fail_ci_if_error: false - + - name: ๐ Upload test results if: always() uses: actions/upload-artifact@v4 @@ -72,7 +72,7 @@ jobs: coverage/ test-report.html retention-days: 7 - + - name: ๐ฌ Comment PR with results if: github.event_name == 'pull_request' && matrix.node-version == '20' uses: actions/github-script@v7 @@ -80,19 +80,19 @@ jobs: script: | const fs = require('fs'); let coverageText = '๐ **Frontend Test Coverage Report**\n\n'; - + try { // Try to read coverage summary if it exists const coveragePath = './coverage/coverage-summary.json'; if (fs.existsSync(coveragePath)) { const coverage = JSON.parse(fs.readFileSync(coveragePath, 'utf8')); const total = coverage.total; - + coverageText += '| Metric | Coverage | Status |\n'; coverageText += '|--------|----------|--------|\n'; - + const getStatus = (pct) => pct >= 80 ? 'โ ' : pct >= 70 ? 'โ ๏ธ' : 'โ'; - + coverageText += `| Lines | ${total.lines.pct}% | ${getStatus(total.lines.pct)} |\n`; coverageText += `| Statements | ${total.statements.pct}% | ${getStatus(total.statements.pct)} |\n`; coverageText += `| Functions | ${total.functions.pct}% | ${getStatus(total.functions.pct)} |\n`; @@ -103,19 +103,19 @@ jobs: } catch (error) { coverageText += `โ ๏ธ Could not parse coverage report: ${error.message}\n`; } - + // Find and update or create comment const { data: comments } = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, }); - - const botComment = comments.find(comment => - comment.user.type === 'Bot' && + + const botComment = comments.find(comment => + comment.user.type === 'Bot' && comment.body.includes('Frontend Test Coverage Report') ); - + if (botComment) { await github.rest.issues.updateComment({ owner: context.repo.owner, @@ -135,22 +135,22 @@ jobs: lint-js: name: Lint JavaScript runs-on: ubuntu-latest - + steps: - name: ๐ Checkout repository uses: actions/checkout@v5 - + - name: ๐ข Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - + - name: ๐ฆ Install ESLint run: | npm install --save-dev eslint npm install --save-dev eslint-plugin-jest || true - + - name: ๐ Run ESLint run: | npx eslint static/js/*.js --ignore-pattern "*.min.js" || true @@ -160,42 +160,42 @@ jobs: name: Integration Tests runs-on: ubuntu-latest needs: test - + steps: - name: ๐ Checkout repository uses: actions/checkout@v5 - + - name: ๐ข Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - + - name: ๐ Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: '3.3' bundler-cache: true - + - name: ๐ฆ Install dependencies run: | npm ci bundle install - + - name: ๐๏ธ Build Jekyll site run: | bundle exec jekyll build env: JEKYLL_ENV: test - + - name: ๐งช Run integration tests run: | npm run test:integration || echo "No integration tests yet" continue-on-error: true - + - name: ๐ค Upload built site uses: actions/upload-artifact@v4 with: name: built-site path: _site/ - retention-days: 1 \ No newline at end of file + retention-days: 1 diff --git a/.gitignore b/.gitignore index a0b1c0261f..b8d32d7238 100644 --- a/.gitignore +++ b/.gitignore @@ -176,4 +176,3 @@ utils/tidy_conf/data/.tmp/ # Node modules node_modules/ - diff --git a/_config.test.yml b/_config.test.yml index 4b5b18022b..da1920130b 100644 --- a/_config.test.yml +++ b/_config.test.yml @@ -98,4 +98,4 @@ force_polling: false # Ensure JavaScript files are always fresh sass: style: expanded # Easier to debug - sourcemap: never # Don't generate sourcemaps \ No newline at end of file + sourcemap: never # Don't generate sourcemaps diff --git a/_config_dev.yml b/_config_dev.yml index aeaa3e326b..6e3fcdc55f 100644 --- a/_config_dev.yml +++ b/_config_dev.yml @@ -1,2 +1,2 @@ # Development configuration - single language only -languages: ["en"] \ No newline at end of file +languages: ["en"] diff --git a/_includes/action_bar.html b/_includes/action_bar.html index a2aef1b4a0..751a07c108 100644 --- a/_includes/action_bar.html +++ b/_includes/action_bar.html @@ -6,7 +6,7 @@ -