-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ba0ea7b
Showing
26 changed files
with
22,401 additions
and
0 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,4 @@ | ||
extends: | ||
- '@commitlint/config-conventional' | ||
rules: | ||
body-max-line-length: [0] |
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 @@ | ||
lib/ |
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,31 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es6": true, | ||
"mocha": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"comma-dangle": ["error", "always-multiline"], | ||
"no-shadow": ["error"], | ||
"semi": ["error", "always"] | ||
}, | ||
"overrides": [{ | ||
"files": ["test/**/*"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off" | ||
} | ||
}] | ||
} |
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,154 @@ | ||
name: Lint, Test & Release | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'dependabot/**' | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
commitlint: | ||
name: Lint commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm clean-install | ||
- name: Lint commit | ||
if: github.event_name == 'push' | ||
run: npx commitlint --from HEAD~1 --to HEAD --verbose | ||
- name: Lint commits | ||
if: github.event_name == 'pull_request' | ||
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose | ||
codelint: | ||
name: Lint code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm clean-install | ||
- name: Lint code | ||
run: npm run lint | ||
buildlint: | ||
name: Check built files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm clean-install | ||
- name: Build files | ||
run: npm run build | ||
- name: Check built files | ||
run: git diff-files --quiet -w | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
needs: | ||
- commitlint | ||
- codelint | ||
- buildlint | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm clean-install | ||
- name: Run tests | ||
run: npm run test -- --forbid-only | ||
coverage: | ||
name: Test coverage | ||
runs-on: ubuntu-latest | ||
needs: | ||
- commitlint | ||
- codelint | ||
- buildlint | ||
permissions: | ||
contents: read | ||
pull-requests: write # to be able to comment on released pull requests | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
- name: Install deps | ||
run: npm ci | ||
- name: Test code | ||
run: npm run test:coverage -- --forbid-only | ||
- name: Report coverage | ||
run: | | ||
echo "# Code coverage" >> $GITHUB_STEP_SUMMARY | ||
npx nyc report | sed --expression='1d;$d' >> $GITHUB_STEP_SUMMARY | ||
if: always() | ||
# release: | ||
# name: Release | ||
# concurrency: release | ||
# if: ${{ github.event_name == 'push' && github.actor != 'dependabot[bot]' }} | ||
# runs-on: ubuntu-latest | ||
# needs: | ||
# - commitlint | ||
# - codelint | ||
# - buildlint | ||
# - test | ||
# permissions: | ||
# contents: write # to be able to publish a GitHub release | ||
# issues: write # to be able to comment on released issues | ||
# pull-requests: write # to be able to comment on released pull requests | ||
# id-token: write # to enable use of OIDC for npm provenance | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Setup Node.js | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: "lts/*" | ||
# cache: 'npm' | ||
# - name: Install dependencies | ||
# run: npm clean-install | ||
# - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
# run: npm audit signatures | ||
# - name: Release | ||
# env: | ||
# NPM_CONFIG_PROVENANCE: true | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# run: npx semantic-release |
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,4 @@ | ||
/.nyc_output/ | ||
/.package/ | ||
/node_modules/ | ||
/coverage/ |
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,6 @@ | ||
{ | ||
"extends": "@istanbuljs/nyc-config-typescript", | ||
"include": ["src"], | ||
"exclude": ["src/main.ts", "src/pre.ts", "src/post.ts"], | ||
"all": 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,8 @@ | ||
plugins: | ||
- '@semantic-release/commit-analyzer' | ||
- '@semantic-release/release-notes-generator' | ||
- ['@semantic-release/changelog', {changelogTitle: '# Changelog'}] | ||
- ['@semantic-release/npm', { npmPublish: false, tarballDir: "./.package" }] | ||
- '@semantic-release/github' | ||
- ['@semantic-release/git', {message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"}] | ||
- ['@semantic-release/exec', { publishCmd: "./misc/publish.sh 'v${nextRelease.version}'" }] |
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,7 @@ | ||
# Changelog | ||
|
||
## 1.0.0 (2023-09-03) | ||
|
||
### Features | ||
|
||
* initial release |
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,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2023 Daniel Hensby and contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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 @@ | ||
# Setup SQL Server Action | ||
|
||
This action installs a version of SQL Server on Windows based GitHub Action Runners. | ||
|
||
## Usage | ||
|
||
See [action.yml](./action.yml): | ||
<!-- start usage --> | ||
```yaml | ||
- uses: tediousjs/setup-sqlserver@v1 | ||
with: | ||
# Skip OS checks that will stop installation attempts preemptively. | ||
# Default: false | ||
skip-os-check: '' | ||
|
||
# Version to use. Examples: 2008, 2012, 2014, etc. "latest" can also be used. | ||
# Default: latest | ||
sqlserver-version: '' | ||
|
||
# The SA user password to use. | ||
# Default: yourStrong(!)Password | ||
sa-password: '' | ||
|
||
# The database collation to use. | ||
# Default: SQL_Latin1_General_CP1_CI_AS | ||
db-collation: '' | ||
|
||
# Any custom install arguments you wish to use. These must be in the format of | ||
# "/ARG=VAL". | ||
install-arguments: '' | ||
|
||
# Wait for the database to respond successfully to queries before completing the | ||
# action. A maximum of 10 attempts is made. | ||
# Default: true | ||
wait-for-ready: '' | ||
``` | ||
<!-- end usage --> | ||
### Basic usage | ||
```yml | ||
- name: Install SQL Server | ||
uses: ./ | ||
with: | ||
sqlserver-version: sql-latest | ||
``` |
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,29 @@ | ||
name: 'Setup SQL Server environment' | ||
description: 'Setup an SQL Server environment in your GitHub runner.' | ||
author: 'tediousjs' | ||
inputs: | ||
skip-os-check: | ||
description: 'Skip OS checks that will stop installation attempts preemptively.' | ||
default: 'false' | ||
sqlserver-version: | ||
description: 'Version to use. Examples: 2008, 2012, 2014, etc. "latest" can also be used.' | ||
default: 'latest' | ||
sa-password: | ||
description: 'The SA user password to use.' | ||
default: 'yourStrong(!)Password' | ||
db-collation: | ||
description: 'The database collation to use.' | ||
default: 'SQL_Latin1_General_CP1_CI_AS' | ||
install-arguments: | ||
description: 'Any custom install arguments you wish to use. These must be in the format of "/ARG=VAL".' | ||
wait-for-ready: | ||
description: 'Wait for the database to respond successfully to queries before completing the action. A maximum of 10 attempts is made.' | ||
default: 'true' | ||
outputs: | ||
sa-password: | ||
description: 'The SA password, this will be the same as the input, but can be useful when relying on the default value.' | ||
instance-name: | ||
description: 'The instance name for the SQL Server.' | ||
runs: | ||
using: 'node16' | ||
main: 'lib/main/index.js' |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.