Skip to content
Merged
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
34 changes: 34 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run unit tests
run: npm run test

- name: Test Summary
if: always()
run: echo "Unit tests completed"
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Lagoon CLI Wrapper

[![Tests](https://github.com/richardgaunt/lagoon-cli-wrapper/actions/workflows/tests.yml/badge.svg)](https://github.com/richardgaunt/lagoon-cli-wrapper/actions/workflows/tests.yml)
[![Linting](https://github.com/richardgaunt/lagoon-cli-wrapper/actions/workflows/lint.yml/badge.svg)](https://github.com/richardgaunt/lagoon-cli-wrapper/actions/workflows/lint.yml)

A Node.js CLI wrapper for the Lagoon CLI that provides an interactive interface for common operations.

## Prerequisites
Expand Down
8 changes: 8 additions & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
transform: {},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.mjs', '**/?(*.)+(spec|test).mjs'],
};
Loading