Skip to content

Commit b196d84

Browse files
authored
Merge pull request #1 from hypercerts-org/feat/init
fix(ci): gha for SDK testing
2 parents 1d057e1 + 0f0d471 commit b196d84

32 files changed

+2913
-223
lines changed

.eslintrc.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Bug Report
2+
description: Create a bug report for the Hypercerts protocol
3+
labels: ['type:bug']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: If you leave out sections there is a high likelihood it will be moved to the [GitHub Discussions](https://github.com/Network-Goods/hypercerts/discussions).
8+
- type: dropdown
9+
attributes:
10+
label: Which area(s) of Hypercerts are affected? (leave empty if unsure)
11+
multiple: true
12+
options:
13+
- 'Smart Contracts'
14+
- 'SDK'
15+
- 'Frontend Dapp'
16+
- 'Docs'
17+
- 'The Graph integration'
18+
- 'OpenZeppelin Defender integration'
19+
- 'Other'
20+
- type: textarea
21+
attributes:
22+
label: To Reproduce
23+
description: Steps to reproduce the behavior, please provide a clear description of how to reproduce the issue. Screenshots can be provided in the issue body below.
24+
validations:
25+
required: true
26+
- type: textarea
27+
attributes:
28+
label: Describe the Bug
29+
description: A clear and concise description of what the bug is.
30+
validations:
31+
required: true
32+
- type: textarea
33+
attributes:
34+
label: Expected Behavior
35+
description: A clear and concise description of what you expected to happen.
36+
validations:
37+
required: true
38+
- type: markdown
39+
attributes:
40+
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear. Contributors should be able to follow the steps provided in order to reproduce the bug.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Feature Request
2+
description: Create a feature request
3+
labels: 'type:featurerequest'
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: Thanks for taking the time to file a feature request! Please fill out this form as completely as possible.
8+
- type: markdown
9+
attributes:
10+
value: Please first verify that your feature was not already discussed on GitHub.
11+
- type: textarea
12+
attributes:
13+
label: Describe the feature you'd like to request
14+
description: A clear and concise description of what you want and what your use case is.
15+
validations:
16+
required: true
17+
- type: textarea
18+
attributes:
19+
label: Describe the solution you'd like
20+
description: A clear and concise description of what you want to happen.
21+
validations:
22+
required: true
23+
- type: textarea
24+
attributes:
25+
label: Describe alternatives you've considered
26+
description: A clear and concise description of any alternative solutions or features you've considered.
27+
validations:
28+
required: true
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Docs Request'
2+
description: A request to update or improve documentation
3+
title: 'Docs: '
4+
labels:
5+
- 'category:docs'
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: What is the improvement or update you wish to see?
10+
description: 'Example: I would like to see more examples of how to use the SDK to detect hypercert claim collisions.'
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: Is there any context that might help us understand?
16+
description: A clear description of any added context that might help us understand.
17+
validations:
18+
required: true
19+
- type: input
20+
attributes:
21+
label: Does the docs page already exist? Please link to it.
22+
description: 'Example: https://hypercerts.org/docs/api-reference/'
23+
validations:
24+
required: false

.github/ISSUE_TEMPLATE/9.other.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: 'Other'
2+
description: For internal use only
3+
body:
4+
- type: textarea
5+
attributes:
6+
label: What is it?
7+
validations:
8+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/Network-Goods/hypercerts/discussions
5+
about: Ask questions and discuss with other community members
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and release - staging
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build-and-test:
8+
name: Build and test
9+
runs-on: ubuntu-latest
10+
environment: test
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install Foundry
16+
uses: foundry-rs/foundry-toolchain@v1
17+
18+
- uses: pnpm/action-setup@v4
19+
name: Install pnpm
20+
with:
21+
run_install: false
22+
23+
- name: Install Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Run tests
33+
run: pnpm test
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build and release - staging
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev/*
8+
- develop/*
9+
- feat/*
10+
11+
jobs:
12+
build-and-test:
13+
name: Build and test
14+
runs-on: ubuntu-latest
15+
environment: test
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install Foundry
21+
uses: foundry-rs/foundry-toolchain@v1
22+
23+
- uses: pnpm/action-setup@v4
24+
name: Install pnpm
25+
with:
26+
run_install: false
27+
28+
- name: Install Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: 'pnpm'
33+
34+
- name: Install dependencies
35+
run: pnpm install
36+
37+
- name: Run tests
38+
run: pnpm test
39+
40+
semantic-release:
41+
needs: build-and-test
42+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
43+
44+
name: Semantic Release
45+
runs-on: ubuntu-latest
46+
environment: staging
47+
permissions:
48+
contents: write
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 0
55+
persist-credentials: false
56+
57+
- uses: pnpm/action-setup@v4
58+
name: Install pnpm
59+
with:
60+
run_install: false
61+
62+
- name: Install Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: 20
66+
cache: 'pnpm'
67+
68+
- name: Prepare prerelease semantic
69+
if: github.ref != 'refs/heads/main'
70+
run: mv .releaserc.prerelease.yaml .releaserc.yaml
71+
72+
- name: Semantic Release
73+
uses: cycjimmy/semantic-release-action@v4
74+
id: semantic # Need an `id` for output variables
75+
with:
76+
extra_plugins: |
77+
@semantic-release/commit-analyzer
78+
@semantic-release/release-notes-generator
79+
@semantic-release/changelog
80+
@semantic-release/github
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GH_PA_TOKEN }}
83+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
84+
85+
- name: Do something when a new release published
86+
if: steps.semantic.outputs.new_release_published == 'true'
87+
run: |
88+
echo ${{ steps.semantic.outputs.new_release_version }}
89+
echo ${{ steps.semantic.outputs.new_release_major_version }}
90+
echo ${{ steps.semantic.outputs.new_release_minor_version }}
91+
echo ${{ steps.semantic.outputs.new_release_patch_version }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
!.yarn/versions
88
**/node_modules
99
**/dist
10+
docs/
1011

1112
# files
1213
*.env

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm commitlint ${1}

0 commit comments

Comments
 (0)