-
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.
Merge pull request #2 from ducktors/add-ci
Add CI
- Loading branch information
Showing
50 changed files
with
2,898 additions
and
1,180 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,35 @@ | ||
--- | ||
name: 🐛 Bug report | ||
about: Create a report to help us improve | ||
--- | ||
|
||
**Please read this entire template before posting any issue. If you ignore these instructions | ||
and post an issue here that does not follow the instructions, your issue might be closed, | ||
locked, and assigned the `missing discussion` label.** | ||
|
||
## 🐛 Bug Report | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
## To Reproduce | ||
|
||
Steps to reproduce the behavior: | ||
|
||
Paste your code here: | ||
|
||
```js | ||
``` | ||
|
||
## Expected behavior | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
Paste the results here: | ||
|
||
```js | ||
``` | ||
|
||
## Your Environment | ||
|
||
- _os_: Mac, Windows, Linux | ||
- _any other relevant information_ |
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,20 @@ | ||
--- | ||
name: 🚀 Feature Proposal | ||
about: Submit a proposal for a new feature | ||
--- | ||
|
||
**Please read this entire template before posting any issue. If you ignore these instructions | ||
and post an issue here that does not follow the instructions, your issue might be closed, | ||
locked, and assigned the `missing discussion` label.** | ||
|
||
## 🚀 Feature Proposal | ||
|
||
A clear and concise description of what the feature is. | ||
|
||
## Motivation | ||
|
||
Please outline the motivation for the proposal. | ||
|
||
## Example | ||
|
||
Please provide an example for how this feature would be used. |
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,41 @@ | ||
--- | ||
name: 💥 Regression Report | ||
about: Report unexpected behavior that worked in previous versions | ||
--- | ||
|
||
**Please read this entire template before posting any issue. If you ignore these instructions | ||
and post an issue here that does not follow the instructions, your issue might be closed, | ||
locked, and assigned the `missing discussion` label.** | ||
|
||
## 💥 Regression Report | ||
|
||
A clear and concise description of what the regression is. | ||
|
||
## Last working version | ||
|
||
Worked up to version: | ||
|
||
Stopped working in version: | ||
|
||
## To Reproduce | ||
|
||
Steps to reproduce the behavior: | ||
|
||
Paste your code here: | ||
|
||
```js | ||
``` | ||
|
||
## Expected behavior | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
Paste the results here: | ||
|
||
```js | ||
``` | ||
|
||
## Your Environment | ||
|
||
- _os_: Mac, Windows, Linux | ||
- _any other relevant information_ |
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 @@ | ||
from_owner: | ||
- dependabot-preview[bot] | ||
- dependabot[bot] | ||
required_labels: | ||
- dependencies | ||
apply_labels: | ||
- autoapproved |
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
assignees: | ||
- "matteovivona" | ||
reviewers: | ||
- "matteovivona" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
assignees: | ||
- "matteovivona" | ||
reviewers: | ||
- "matteovivona" |
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,20 @@ | ||
## In this PR | ||
|
||
- Bug fix (non-breaking change which fixes an issue) | ||
- New feature (non-breaking change which adds functionality) | ||
|
||
## Issues reference | ||
|
||
- <https://github.com/ducktors/carretto/issues/> | ||
- <https://github.com/ducktors/carretto/issues/> | ||
|
||
### Checklist | ||
|
||
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/ducktors/carretto/pulls) for the same update/change? | ||
<!-- You can erase any parts of this template not applicable to your Pull Request. --> | ||
- [ ] Have you lint your code with `pnpm lint` locally prior to submission? | ||
- [ ] Have you added an explanation of what your changes do and why you'd like us to include them? | ||
- [ ] Have you written new tests for your core changes, as applicable? | ||
- [ ] Have you successfully ran build with `pnpm build` of your changes locally? | ||
- [ ] Have you successfully ran tests with `pnpm test` of your changes locally? | ||
- [ ] Have you commit using [Conventional Commits](https://github.com/ducktors/carretto#how-to-commit)? |
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,117 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
name: Build | ||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
with: | ||
version: 7 | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint code | ||
run: pnpm lint | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
test: | ||
runs-on: macos-latest | ||
name: Test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7 | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run tests | ||
run: pnpm turbo test:ci | ||
|
||
- name: Copy json coverage report | ||
run: | | ||
mkdir -p coverage | ||
cp ./packages/http/coverage/coverage-final.json ./coverage/coverage-http.json | ||
cp ./packages/main-loader/coverage/coverage-final.json ./coverage/coverage-main-loader.json | ||
cp ./packages/mongodb/coverage/coverage-final.json ./coverage/coverage-mongodb.json | ||
- name: Merge json coverage reports | ||
run: pnpm dlx nyc merge coverage coverage/merged-coverage.json | ||
|
||
- name: Convert json coverage report to lcov | ||
run: | | ||
pnpm dlx nyc report --reporter=lcov --temp-directory=coverage | ||
ls -al ./coverage/ | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./coverage/lcov.info | ||
|
||
- name: CodeClimate | ||
uses: paambaati/codeclimate-action@v3.2.0 | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TEST_REPORTER_ID }} |
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,59 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
name: Release | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7 | ||
|
||
- name: Setup npmrc | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.DUCKTORS_NPM_TOKEN }}" > .npmrc | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Create Release Pull Request or Publish packages | ||
id: changesets | ||
uses: changesets/action@v1.4.1 | ||
with: | ||
publish: pnpm publish | ||
commit: "chore(release): update monorepo packages versions" | ||
title: "Upcoming Release Changes" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm dlx lint-staged |
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,3 @@ | ||
{ | ||
"*": "rome check . && rome format ." | ||
} |
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,2 @@ | ||
enable-pre-post-scripts=true | ||
side-effects-cache=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,22 @@ | ||
{ | ||
"workbench.colorCustomizations": { | ||
"activityBar.activeBackground": "#ed623c", | ||
"activityBar.background": "#ed623c", | ||
"activityBar.foreground": "#15202b", | ||
"activityBar.inactiveForeground": "#15202b99", | ||
"activityBarBadge.background": "#33ec5b", | ||
"activityBarBadge.foreground": "#15202b", | ||
"commandCenter.border": "#e7e7e799", | ||
"sash.hoverBorder": "#ed623c", | ||
"statusBar.background": "#e14115", | ||
"statusBar.foreground": "#e7e7e7", | ||
"statusBarItem.hoverBackground": "#ed623c", | ||
"statusBarItem.remoteBackground": "#e14115", | ||
"statusBarItem.remoteForeground": "#e7e7e7", | ||
"titleBar.activeBackground": "#e14115", | ||
"titleBar.activeForeground": "#e7e7e7", | ||
"titleBar.inactiveBackground": "#e1411599", | ||
"titleBar.inactiveForeground": "#e7e7e799" | ||
}, | ||
"peacock.color": "#e14115" | ||
} |
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
Oops, something went wrong.