This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
generated from tophat/new-project-kit
-
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.
- Loading branch information
Noah Negin-Ulster
committed
May 13, 2021
1 parent
02a621b
commit bc2ab42
Showing
42 changed files
with
12,727 additions
and
77 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,15 @@ | ||
{ | ||
"projectName": "yarn-plugin-semver-up", | ||
"projectOwner": "tophat", | ||
"repoType": "github", | ||
"repoHost": "https://github.com", | ||
"files": [ | ||
"README.md" | ||
], | ||
"imageSize": 100, | ||
"commit": false, | ||
"commitConvention": "none", | ||
"contributors": [], | ||
"contributorsPerLine": 7, | ||
"skipCi": 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,16 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
end_of_line = lf | ||
max_line_length = off | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
|
||
[{CHANGELOG.md,package.json,yarn.lock}] | ||
indent_size = 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,4 @@ | ||
coverage | ||
website/node_modules | ||
!.eslintrc.js | ||
node_modules |
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 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'prettier'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'@tophat/eslint-config/base', | ||
'@tophat/eslint-config/jest', | ||
'prettier', | ||
], | ||
rules: { | ||
'no-empty': 'off', | ||
'no-unused-vars': 'off', // covered by typescript eslint | ||
'import/named': 'off', | ||
'import/order': [ | ||
'error', | ||
{ | ||
alphabetize: { order: 'asc' }, | ||
'newlines-between': 'always', | ||
groups: [ | ||
'unknown', | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index', | ||
], | ||
}, | ||
], | ||
}, | ||
ignorePatterns: ['.*', '**/*.js', 'lib'], | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.js'], | ||
}, | ||
'import/resolver': { | ||
typescript: './tsconfig.json', | ||
}, | ||
}, | ||
} |
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 @@ | ||
/.yarn/releases/** binary | ||
/.yarn/sdks/** binary | ||
/bundles/@yarnpkg/** binary |
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
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
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,9 @@ | ||
--- | ||
name: Question | ||
about: Have a question about the plugin? | ||
|
||
--- | ||
|
||
**What's your question?** | ||
|
||
<!-- Please read the documentation before asking your question. --> |
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 @@ | ||
## Description | ||
|
||
<!-- Provide a description of what your PR introduces or changes. --> | ||
|
||
e.g. This PR refactors the X logic, applying Y's algorithm to improve Z by K percent. | ||
|
||
## Related Issues | ||
|
||
<!-- Does this PR directly address an existing GitHub issue? If not, you may want to consider creating an issue first. --> | ||
|
||
- Closes #0, a short description of the linked issue. | ||
|
||
## Checklist | ||
|
||
<!-- Please mark items as completed where appropriate. e.g. [x]. --> | ||
|
||
- [ ] I agree to abide by the [Code of Conduct](https://github.com/tophat/yarn-plugin-licenses/blob/master/CODE_OF_CONDUCT.md). | ||
- [ ] This PR has sufficient documentation. | ||
- [ ] This PR has sufficient test coverage. | ||
- [ ] This PR title satisfies semantic [convention](https://www.conventionalcommits.org/en/v1.0.0/#summary). | ||
|
||
## Additional Comments | ||
|
||
<!-- Feel free to add any additional comments related to this PR. --> | ||
|
||
No additional comments. |
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,11 @@ | ||
name: detect-env | ||
description: Sets node and yarn version from nvmrc and yvmrc files. | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Determine Node Version | ||
run: echo NODE_VERSION=$(cat .nvmrc | tr -d '\n') >> $GITHUB_ENV | ||
shell: bash | ||
- name: Determine Yarn Version | ||
run: echo YARN_VERSION=$(cat .yvmrc | tr -d '\n') >> $GITHUB_ENV | ||
shell: bash |
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,14 @@ | ||
#!/bin/bash | ||
|
||
# From https://github.com/decidim/decidim (AGPL-3.0) | ||
|
||
EVENT_PAYLOAD_FILE=$1 | ||
|
||
PR_ID=`jq ".number // .check_run.pull_requests[0].number" $EVENT_PAYLOAD_FILE` | ||
GIT_SHA=`jq -r ".pull_request.head.sha // .check_run.head_sha // .after" $EVENT_PAYLOAD_FILE` | ||
|
||
if [ $PR_ID = "null" ]; then | ||
bash <(curl -s https://codecov.io/bash) -C $GIT_SHA -s $ARTIFACT_DIR | ||
else | ||
bash <(curl -s https://codecov.io/bash) -C $GIT_SHA -P $PR_ID -s $ARTIFACT_DIR | ||
fi |
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,116 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
CI: 1 | ||
ARTIFACT_DIR: ./artifacts | ||
|
||
jobs: | ||
commit-watch: | ||
name: Run Commit Watch | ||
runs-on: ubuntu-20.04 | ||
if: "github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Create artifacts directory | ||
run: mkdir -p ${{ env.ARTIFACT_DIR }} | ||
- name: Run Commit Watch | ||
env: | ||
COMMIT_WATCH_OUTPUT_DIR: ${{ env.ARTIFACT_DIR }}/ | ||
COMMITWATCH_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
CI_REPO_OWNER: ${{ github.repository_owner }} | ||
CI_REPO_NAME: ${{ github.event.repository.name }} | ||
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | ||
CI_BASE_BRANCH: origin/${{ github.base_ref }} | ||
run: yarn dlx commit-watch | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: commit-watch-artifacts | ||
path: ${{ env.ARTIFACT_DIR }} | ||
tests: | ||
name: Lint & Tests | ||
runs-on: ubuntu-20.04 | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Create artifacts directory | ||
run: mkdir -p ${{ env.ARTIFACT_DIR }} | ||
- name: Restore yarn cache | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
./.yarn | ||
./.pnp.* | ||
key: ${{ env.NODE_VERSION }}-${{ env.YARN_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
- name: Linting | ||
run: yarn lint:ci | ||
- name: Set GitHub user for tests | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Top Hat Open Source" | ||
- name: Tests | ||
run: yarn test:ci | ||
- name: Upload Coverage Report | ||
run: ./.github/codecov.sh $GITHUB_EVENT_PATH | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: report-artifacts | ||
path: ${{ env.ARTIFACT_DIR }} | ||
build: | ||
name: Build | ||
runs-on: ubuntu-20.04 | ||
needs: [tests] | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Create artifacts directory | ||
run: mkdir -p ${{ env.ARTIFACT_DIR }} | ||
- name: Restore yarn cache | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
./.yarn | ||
./.pnp.* | ||
key: ${{ env.NODE_VERSION }}-${{ env.YARN_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
- name: Build | ||
run: yarn build | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-artifacts | ||
path: ${{ env.ARTIFACT_DIR }} |
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,45 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
CI: 1 | ||
ARTIFACT_DIR: ./artifacts | ||
|
||
jobs: | ||
release: | ||
name: Publish Yarn Semver Up Plugin | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Create artifacts directory | ||
run: mkdir -p ${{ env.ARTIFACT_DIR }} | ||
- name: Restore yarn cache | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
./.yarn | ||
./.pnp.* | ||
key: ${{ env.NODE_VERSION }}-${{ env.YARN_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
- name: Build Package | ||
run: yarn build | ||
- name: Publish Package | ||
run: echo "No publish capability at the moment." | ||
- name: Upload Artifacts | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: reports-and-build-artifacts | ||
path: | | ||
${{ env.ARTIFACT_DIR }} |
Oops, something went wrong.