Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: initial setup #2

Merged
merged 4 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .circleci/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: 2.1
executors:
node18:
docker:
- image: cimg/node:18.18

orbs:
codecov: codecov/codecov@3.3.0

commands:
setup:
steps:
- checkout
- run:
name: Installing Dependencies
command: npm install
- run:
name: prepare test git user
command: git config --global user.email "circleci@example.com" && git config --global user.name "CircleCi Build"

jobs:
build:
executor: node18
parallelism: 15

steps:
- setup
- run:
name: Split package list
command: circleci tests glob "packages/*" | circleci tests split > /tmp/tests-to-run
- run:
name: Lint
command: cat /tmp/tests-to-run | xargs -I % npm run lint -w %
- run:
name: Running tests and getting code coverage
command: cat /tmp/tests-to-run | xargs -I % npm run test -w %
- codecov/upload
- run:
name: Copy test results
command: |
mkdir junit
cat /tmp/tests-to-run | xargs -I % cp %/junit/test-results.xml junit/test-results-$CIRCLE_NODE_INDEX.xml
- store_test_results:
path: junit

workflows:
version: 2
build:
jobs:
- build
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/*
.vscode/*
coverage/*
16 changes: 16 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

module.exports = {
root: true,
extends: '@adobe/helix',
};
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve

---

**Description**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Discussion
about: Start a new discussion

---

## Overview
whats' this discussion about?

## Details
more details

## Proposed Actions
and now?
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Please ensure your pull request adheres to the following guidelines:
- [ ] make sure to link the related issues in this description
- [ ] when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

## Related Issues


Thanks for contributing!
33 changes: 33 additions & 0 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Semantic Release
on:
push:
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Authenticate with Registry
run: |
echo "registry=https://registry.npmjs.org/" > .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
- run: npm install
- run: npm run lint
- run: npm test
- run: npm run semantic-release
env:
GH_TOKEN: ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
solaris007 marked this conversation as resolved.
Show resolved Hide resolved
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/semver-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
push:
branches-ignore:
- 'main'

jobs:
ci_trigger:
runs-on: ubuntu-latest
name: Comment Semantic Release Status
steps:
- name: Comment
id: comment
uses: adobe-rnd/github-semantic-release-comment-action@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ dist
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# IDEA
.idea/*

# yarn v2
.yarn/cache
.yarn/unplugged
Expand Down
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged

17 changes: 17 additions & 0 deletions .jsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"plugins": [],
"recurseDepth": 10,
"source": {
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"sourceType": "module",
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false
}
}
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage/
node_modules/
junit/
test/
docs/
logs/
test-results.xml
renovate.json
.*
16 changes: 16 additions & 0 deletions .releaserc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md",
}],
"@semantic-release/npm",
["@semantic-release/git", {
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
["@semantic-release/github", {}]
],
branches: ['main'],
};
Empty file added CHANGELOG.md
Empty file.
Empty file added docs/.keep
Empty file.
Loading
Loading