-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tooling (GH workflows & templates, pkg manager, etc.)
- Loading branch information
1 parent
0f201d9
commit df0dd3e
Showing
25 changed files
with
1,603 additions
and
2,467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM node:22-slim | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Install dependencies | ||
RUN --mount=type=cache,target=/var/cache/apt/install \ | ||
apt-get update \ | ||
&& apt-get -y install --no-install-recommends \ | ||
ca-certificates curl git gnupg2 locales shellcheck wget zsh | ||
|
||
# Set locales | ||
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment \ | ||
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ | ||
&& echo "LANG=en_US.UTF-8" > /etc/locale.conf \ | ||
&& locale-gen en_US.UTF-8 | ||
|
||
# Install Yarn | ||
RUN --mount=type=cache,target=/var/cache/yarn \ | ||
npm install -g corepack \ | ||
&& corepack enable \ | ||
&& yarn set version stable | ||
|
||
# Enable shell history between sessions | ||
RUN --mount=type=cache,target=/var/cache/commandhistory \ | ||
mkdir /commandhistory \ | ||
&& touch /commandhistory/.zsh_history \ | ||
&& chown -R node /commandhistory | ||
|
||
# Set Zsh as default shell | ||
RUN usermod --shell /bin/zsh node | ||
|
||
USER node | ||
|
||
# Install and configure zsh | ||
RUN --mount=type=cache,target=/var/cache/oh-my-zsh \ | ||
sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.0/zsh-in-docker.sh)" -- \ | ||
-x \ | ||
-t robbyrussell \ | ||
-p debian \ | ||
-p git \ | ||
-p node \ | ||
-p yarn \ | ||
-a "zstyle ':omz:update' mode auto" \ | ||
-a "export PROMPT_COMMAND='history -a'" \ | ||
-a "export HISTFILE=/commandhistory/.zsh_history" \ | ||
-a "function gi() { curl -sLw \"\\\n\" https://www.toptal.com/developers/gitignore/api/\$@ ;}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "bats-zsh", | ||
"build": { | ||
"context": "..", | ||
"dockerfile": "./Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"GitHub.vscode-pull-request-github", | ||
"streetsidesoftware.code-spell-checker", | ||
"ms-azuretools.vscode-docker", | ||
"EditorConfig.EditorConfig", | ||
"github.vscode-github-actions", | ||
"VisualStudioExptTeam.vscodeintellicode", | ||
"VisualStudioExptTeam.vscodeintellicode-completions", | ||
"DavidAnson.vscode-markdownlint", | ||
"esbenp.prettier-vscode", | ||
"ms-vscode-remote.remote-containers", | ||
"mads-hartmann.bash-ide-vscode", | ||
"jetmartin.bats", | ||
"timonwong.shellcheck", | ||
"redhat.vscode-yaml" | ||
] | ||
} | ||
}, | ||
"remoteUser": "node" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[{Dockerfile,*.sh}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{json,markdownlintrc,md,yml}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Bug Report | ||
description: File a bug report. | ||
title: "[Bug]: " | ||
labels: ["bug"] | ||
body: | ||
- type: textarea | ||
id: expected-behavior | ||
attributes: | ||
label: What did you expect to happen? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: actual-behavior | ||
attributes: | ||
label: What actually happened? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: How can you reproduce the bug? | ||
description: Include step-by-step instructions. | ||
validations: | ||
required: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Feature Request | ||
description: Request a new feature. | ||
title: "[Feature]: " | ||
labels: ["enhancement"] | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: What feature do you want added? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: use-case | ||
attributes: | ||
label: What problem would this feature solve? | ||
validations: | ||
required: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Help Request | ||
description: Ask for help. | ||
title: "[Help]: " | ||
labels: ["help wanted"] | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: What do you need help with? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: use-case | ||
attributes: | ||
label: What steps have you taken? | ||
description: How have you tried to answer this question on your own? | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: devcontainers | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
allow: | ||
- dependency-type: production |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish to npmjs | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
NODE_ENV: production | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22.x" | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Publish the package | ||
run: yarn npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Lint and Run Automated Tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22.x" | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
|
||
- name: Run Linters | ||
run: yarn lint | ||
|
||
test: | ||
strategy: | ||
matrix: | ||
os: ["macos-latest", "ubuntu-latest"] | ||
include: | ||
- os: ubuntu-latest | ||
installzsh: true | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- if: matrix.installzsh | ||
run: sudo apt-get install zsh | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22.x" | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
|
||
- name: Run bats tests | ||
run: npm test --recursive |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.