Skip to content

Commit

Permalink
Add to CI, exclude fmt/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Sep 20, 2024
1 parent 83544fe commit b851dd1
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: denoland/setup-deno@v1
with:
deno-version: rc

- name: lint
if: matrix.os == 'macOS-latest'
run: |
Expand All @@ -34,3 +38,19 @@ jobs:
if: matrix.os == 'windows-latest'
shell: pwsh
run: ./install_test.ps1

- name: deno lint
run: deno lint

- name: check fmt
run: deno fmt --check

- name: check bundled file up to date
run: |
cd shell-setup
deno task bundle
if ! git --no-pager diff --exit-code ./bundled.esm.js; then
echo 'Bundled script is out of date, update it with `cd shell-setup; deno task bundle`.
exit 1
fi
15 changes: 15 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"workspace": [
"./shell-setup"
],
"lint": {
"exclude": [
"./shell-setup/bundled.esm.js"
]
},
"fmt": {
"exclude": [
"./shell-setup/bundled.esm.js"
]
}
}
4 changes: 2 additions & 2 deletions shell-setup/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ async function updateRcFile(
command: string | UpdateRcFile,
backups: Backups,
): Promise<boolean> {
let prepend: string = "";
let append: string = "";
let prepend = "";
let append = "";
if (typeof command === "string") {
append = command;
} else {
Expand Down

0 comments on commit b851dd1

Please sign in to comment.