Skip to content

Commit

Permalink
feat!: Upgrade to CSpell 6.0.0 (#141)
Browse files Browse the repository at this point in the history
Requires Node >=14
  • Loading branch information
Jason3S committed May 22, 2022
1 parent d05bffd commit df3c79b
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 226 deletions.
10 changes: 3 additions & 7 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,20 @@ categories:
- title: "Maintenance / Dependencies"
labels:
- "chore"
change-template: |
- $TITLE (#$NUMBER)
- title: "Dependabot"
labels:
- "dependencies"
change-template: |
- $TITLE (#$NUMBER)

change-template: |
<details>
<summary>$TITLE (#$NUMBER)</summary>
### $TITLE (#$NUMBER)
$BODY
---
</details>
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/cspell-action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: cspell-action
on:
pull_request:
push:
branches:
- main
pull_request:
push:
branches:
- main

jobs:
cspell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: streetsidesoftware/cspell-action@v1
with:
files: |
**
.*/**
incremental_files_only: false

cspell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: streetsidesoftware/cspell-action@v1
with:
files: |
**
.*/**
incremental_files_only: false
92 changes: 46 additions & 46 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
name: Test
on:
pull_request:
push:
branches:
- main
pull_request:
push:
branches:
- main

jobs:
test-old-node-versions:
runs-on: ${{ matrix.os }}
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
- 16.x
strategy:
matrix:
node-version:
# List of supported node versions (latest is tested in `test-os`)
- 14.x
- 16.x
- 18.x

os:
- ubuntu-latest
os:
- ubuntu-latest

steps:
- uses: actions/checkout@v3
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- run: npm ci
- run: npm test
- run: npm ci
- run: npm test

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

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

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

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

steps:
- uses: actions/checkout@v3
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npm test
- run: npm ci
- run: npm test

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

on:
push:
branches:
- main
paths:
- '**/package.json'
- '**/package-lock.json'
workflow_dispatch:
schedule:
- cron: '0 12 * * 0'
push:
branches:
- main
paths:
- "**/package.json"
- "**/package-lock.json"
workflow_dispatch:
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/checkout@v3
with:
ref: ${{ env.REF_BRANCH }}
- name: Update Root
run: |
npm i
npx npm-check-updates -t minor -u
rm -rf node_modules package-lock.json
- 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
echo "### Workflow Bot -- Update ALL Dependencies" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "#### Package.json" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "\`\`\`\`\`\`diff" >> $GITHUB_ENV
git --no-pager diff package.json >> $GITHUB_ENV
echo "\`\`\`\`\`\`" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "#### Summary" >> $GITHUB_ENV
echo "" >> $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/github-app-token@v1.5 # 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/create-pull-request@v4
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
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/checkout@v3
with:
ref: ${{ env.REF_BRANCH }}
- name: Update Root
run: |
npm i
npx npm-check-updates -t minor -u
rm -rf node_modules package-lock.json
- 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
echo "### Workflow Bot -- Update ALL Dependencies" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "#### Package.json" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "\`\`\`\`\`\`diff" >> $GITHUB_ENV
git --no-pager diff package.json >> $GITHUB_ENV
echo "\`\`\`\`\`\`" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "#### Summary" >> $GITHUB_ENV
echo "" >> $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/github-app-token@v1.5 # 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/create-pull-request@v4
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
Loading

0 comments on commit df3c79b

Please sign in to comment.