Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Jun 5, 2021
1 parent d154187 commit 60c6e44
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

patreon: streetsidesoftware
tidelift: "npm/cspell"
# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: # Replace with a single IssueHunt username
# otechie: # Replace with a single Otechie username
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
target-branch: "cspell4"
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
target-branch: "cspell4"
schedule:
interval: "daily"
33 changes: 33 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "CodeQL"

on:
push:
branches:
- main
- cspell4
pull_request:
branches:
- main
- cspell4
schedule:
- cron: "0 23 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/[email protected]
with:
# Make sure it goes back far enough to find where the branch split from main
fetch-depth: 20

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "javascript"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
13 changes: 13 additions & 0 deletions .github/workflows/cspell-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: cspell-action
on:
pull_request:
push:
branches:
- main

jobs:
cspell:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: streetsidesoftware/[email protected]
62 changes: 62 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test
on:
pull_request:
push:
branches:
- main

jobs:
test-old-node-versions:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version:
# List of supported node versions (latest is tested in `test-os`)
- 12.x
- 14.x

os:
- ubuntu-latest

steps:
- uses: actions/[email protected]

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npm test

# Ensure the repository is clean after build & test
- run: git --no-pager diff --compact-summary --exit-code

test-os:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version:
# Test the latest node version here, move older versions to `test-old-node-versions`
- 15.x

os:
- ubuntu-latest
- windows-latest
- macos-latest

steps:
- uses: actions/[email protected]

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npm test

# Ensure the repository is clean after build & test
- run: git --no-pager diff --compact-summary --exit-code
66 changes: 66 additions & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Update Dependencies Main

on:
push:
branches:
- main
paths:
- '**/package.json'
- '**/package-lock.json'
workflow_dispatch:
inputs:
updateSnapshots:
description: 'Update Integration Test snapshots (yes/no)'
default: 'yes'
schedule:
- cron: '0 12 * * 0'

jobs:
update-dependencies:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest
env:
NEW_BRANCH: 'update-dependencies-main'
REF_BRANCH: main
steps:
- name: Start
run: |
echo "${{ toJson(github.event.inputs) }}"
- name: Checkout code
uses: actions/[email protected]
with:
ref: ${{ env.REF_BRANCH }}
- name: Update Root
run: |
rm -rf package-lock.json
npm update -S
- name: Install
run: npm install
- name: Has changes
run: |
git --no-pager diff --compact-summary --exit-code && echo "git_status=clean" >> $GITHUB_ENV || echo "git_status=dirty" >> $GITHUB_ENV
git --no-pager diff --compact-summary
- name: Gen Body
run: |
echo 'git_body<<DIFF' >> $GITHUB_ENV
git --no-pager diff --compact-summary >> $GITHUB_ENV
echo 'DIFF' >> $GITHUB_ENV
- name: Echo git_status
run: echo ${{ env.git_status }}
- uses: tibdex/[email protected] # cspell:ignore tibdex
if: env.git_status == 'dirty'
id: generate-token
with:
app_id: ${{ secrets.AUTOMATION_APP_ID }}
private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
- name: Create Pull Request
if: env.git_status == 'dirty'
uses: peter-evans/[email protected]
with:
commit-message: 'ci: Workflow Bot -- Update ALL Dependencies'
branch: ${{ env.NEW_BRANCH }}
base: ${{ env.REF_BRANCH }}
title: 'ci: Workflow Bot -- Update ALL Dependencies (${{ env.REF_BRANCH }})'
token: ${{ steps.generate-token.outputs.token }}
body: ${{ env.git_body }}
delete-branch: true
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# cspell-cli
cspell command line that can be used with pre-commit

This is just a simple repository that allows [cspell](https://github.com/streetsidesoftware/cspell) to be installed from github.

To install:

```
npm install -g git+https://github.com/streetsidesfotware/cspell-cli
```

This will add the `cspell-cli` command to npm.
12 changes: 12 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"files": [
"**",
".*/**"
],
"ignorePaths": [
".git",
".gitignore",
"node_modules",
"package-lock.json"
]
}
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node

'use strict';

require('cspell/bin');

0 comments on commit 60c6e44

Please sign in to comment.