Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Coverage

on:
pull_request:
push:
branches:
- main
- develop
- feature/**
- fix/**

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Run coverage (headless)
run: npm run coverage

- name: Save coverage summary to job summary
run: npx nyc report --reporter=text-summary >> $GITHUB_STEP_SUMMARY

- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: coverage/

- name: Upload lcov
uses: actions/upload-artifact@v4
with:
name: coverage-lcov
path: coverage/lcov.info


- name: Upload Coverage to CodeCov
if: success()
uses: codecov/codecov-action@v4
with:
file: .nyc_output/coverage-final.json
flags: unittests
name: metacatui-coverage
fail_ci_if_error: false
144 changes: 141 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,144 @@
*.DS_Store
/.project
# ===================================
# Editor and IDE files
# ===================================
# Visual Studio Code
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# IntelliJ IDEA / WebStorm / PhpStorm
.idea/
*.iml
*.iws
*.ipr

# Sublime Text
*.sublime-project
*.sublime-workspace

# Vim
*.swp
*.swo
*~
.netrwhist

# Emacs
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# Atom
.ftpconfig
.sftpconfig

# ===================================
# Operating System files
# ===================================
# macOS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Icon?

# Windows
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
$RECYCLE.BIN/

# Linux
*~
.fuse_hidden*
.directory
.Trash-*
.nfs*

# ===================================
# Development and Build artifacts
# ===================================
# Node.js (if not already covered)
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.npm
.yarn-integrity

# Coverage and testing
coverage/
coverage-artifacts/
.nyc_output/
.coverage
*.cover
.nyc_output
.cache

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# ===================================
# Build artifacts and temporary files
# ===================================
dist/
build/
tmp/
temp/
*.tmp

# ===================================
# Environment and configuration
# ===================================
# Environment files
.env
.env.local
.env.*.local


# Local configuration overrides
config.local.*
*local.json

# ===================================
# Archive and compressed files
# ===================================
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip


src/js/themes/ess-dive
src/js/themes/opc
src/js/themes/hosted-repository
Expand All @@ -23,7 +162,6 @@ docs/_site
docs/vendor
*.code-workspace


# Ignore everything in src/components/semantic except the distribution files we
# need and the src files we've modified from the npm source.
src/components/semantic/*
Expand Down
Empty file added .nyc_output/.gitkeep
Empty file.
16 changes: 16 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"reporter": ["text-summary", "html", "lcov"],
"report-dir": "coverage",
"temp-dir": ".nyc_output",
"all": true,
"include": ["src/js/**/*.js"],
"exclude": [
"test/**",
"**/*.spec.js",
"node_modules/**",
"coverage/**",
"run-coverage.js",
"server.js",
"src/components/**"
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- Contact us: [email protected]

![Tests Status](https://github.com/NCEAS/metacatui/actions/workflows/test.js.yml/badge.svg)
[![Coverage Status](https://codecov.io/gh/NCEAS/metacatui/graph/badge.svg)](https://codecov.io/gh/NCEAS/metacatui)


MetacatUI is a client-side web interface for querying Metacat servers and other servers that implement the DataONE REST API. Currently, it is used as the basis for the [KNB Data Repository](http://knb.ecoinformatics.org), the [NSF Arctic Data Center](https://arcticdata.io/catalog/), the [DataONE federation](https://search.dataone.org), and other repositories.

Expand Down
Empty file added coverage/.gitkeep
Empty file.
Loading
Loading