Skip to content

Commit

Permalink
🔥 initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hudsonm62 committed Apr 25, 2024
1 parent 9ad21d8 commit 922f0f8
Show file tree
Hide file tree
Showing 23 changed files with 1,083 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"labels": ["dependencies"]
}
129 changes: 129 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: CI

on: push

permissions: read-all
jobs:
test-build:
strategy:
matrix:
bun-version: [latest, "1.1.4"]
name: Test Builds
runs-on: ubuntu-latest
steps:
- name: ⚙️ Checkout Repo
uses: actions/checkout@v4

- name: 🧹 Lint Prettier
uses: hudsonm62/prettier-cli@v1.0.0

- name: 🍞 Setup Bun ${{ matrix.bun-version }}
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ matrix.bun-version }}

- name: 🗃 Install Deps
run: bun install --frozen-lockfile #--production

- name: 📦 Build Package
run: bun run bundle -o dist-ci --debug

- name: Verify output with commited
run: diff -qr dist dist-ci

# todo - could probably add more steps still
test-action:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Test Action (local)
steps:
- name: ⚙️ Checkout Repo
uses: actions/checkout@v4
- name: Normal Folder Compare
uses: ./
with:
path1: "./__tests__/compare/directory1"
path2: "./__tests__/compare/directory2"
output_diff: true

- name: Normal File Compare
uses: ./
with:
path1: "./__tests__/compare/m_file1.txt"
path2: "./__tests__/compare/m_file3.txt"
output_diff: true

- name: Normal File Compare
uses: ./
with:
path1: "./__tests__/compare/m_file1.txt"
path2: "./__tests__/compare/m_file3.txt"
output_diff: true

- name: Exclude File Compare
uses: ./
with:
path1: "./__tests__/compare/directory1"
path2: "./__tests__/compare/directory2"
exclude: "d_file2.txt"
output_diff: true

# checks root compare vs directory1 (which contain identical files except the folders), so ignore the folders and compare roots
- name: Exclude Folders and Files
uses: ./
with:
path1: "./__tests__/compare"
path2: "./__tests__/compare/directory1"
exclude: "d_file2.txt,directory2,directory1"
output_diff: true

- name: Test no error
uses: ./
with:
path1: "./__tests__/compare/d_file2.txt"
path2: "./__tests__/compare/m_file1.txt"
no_error: true
output_diff: true

- name: Test warn instead
uses: ./
with:
path1: "./__tests__/compare/d_file2.txt"
path2: "./__tests__/compare/m_file1.txt"
warn_instead: true
output_diff: true

- name: Test error same (same files)
continue-on-error: true
uses: ./
with:
path1: "./__tests__/compare/m_file1.txt"
path2: "./__tests__/compare/m_file1.txt"
error_same: true
output_diff: true
- name: Test error same (different files)
continue-on-error: false # shouldn't fail, since its erroring on matches
uses: ./
with:
path1: "./__tests__/compare/m_file1.txt"
path2: "./__tests__/compare/d_file2.txt"
error_same: true
output_diff: true

- name: Test Exclude Glob1
uses: ./
with:
path1: "./__tests__/compare"
path2: "./__tests__/compare"
exclude: "**/d_file2.txt"
output_diff: true
- name: Test Exclude Glob2
uses: ./
with:
path1: "./__tests__/compare"
path2: "./__tests__/compare"
exclude: "**/*.txt"
no_error: true
output_diff: true
175 changes: 175 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore

# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Caches

.cache

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt


# Gatsby files

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# IntelliJ based IDEs
.idea

# Finder (MacOS) folder config
.DS_Store
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"endOfLine": "lf",
"singleQuote": false,
"tabWidth": 2,
"semi": false
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"files.exclude": {
"node_modules/": true,
"yarn.lock": true,
"dist/": true
}
}
Loading

0 comments on commit 922f0f8

Please sign in to comment.