Skip to content

Commit

Permalink
chore: set ci (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia authored Aug 5, 2024
1 parent 0f0159e commit 91c2e8b
Show file tree
Hide file tree
Showing 12 changed files with 219 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Bug report
description: Create a report to help us improve
title: 'Bug: '
labels: ['type: bug']

body:
- type: textarea
id: steps
attributes:
label: Describe the bug and the steps to reproduce it
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: What's the expected behavior?

- type: textarea
id: environment
attributes:
label: What version of the libraries are you using?
placeholder: |
- OnchainKit: [e.g. 0.2.x]
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Base Discord
url: https://base.org/discord
about: The official Base Discord community.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Documentation request
description: Suggest a documentation for this project
title: 'Documentation Request: '
labels: ['type: documentation']

body:
- type: markdown
attributes:
value: |
This issue form is for documentation requests only!
If you've found a bug, please use [bug_report](/new?template=bug_report.yml)
- type: textarea
id: problem
attributes:
label: Is your documentation request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. It's not clear when [...]
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Feature request
description: Suggest an idea for this project
title: 'Feature Request: '
labels: ['type: enhancement']

body:
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered.
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**What changed? Why?**

**Notes to reviewers**

**How has it been tested?**
18 changes: 18 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Setup
runs:
using: composite
steps:
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org
cache: yarn

# For provenance https://docs.npmjs.com/generating-provenance-statements#prerequisites
- name: Install npm 9.5
run: npm install -g npm@^9.5.0
shell: bash

- name: Install node modules
run: yarn install --frozen-lockfile
shell: bash
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Template Build
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Template Install dependencies
run: npm install

- name: Template Test Build
# When fails, please check your build
run: |
npm run build
28 changes: 28 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Template Check
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Template Install dependencies
run: npm install

- name: Template Check
run: npm run ci:check
28 changes: 28 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Template Format
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Template Install dependencies
run: npm install

- name: Template Format
run: npm run ci:format
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Template Lint
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Template Install dependencies
run: npm install

- name: Template Lint
run: npm run ci:lint
14 changes: 14 additions & 0 deletions .github/workflows/salus-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Salus Security Scan

on: [pull_request, push]

jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Salus Scan
id: salus_scan
uses: federacy/[email protected]
with:
active_scanners: "\n - PatternSearch\n - Semgrep\n - Trufflehog"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Leonardo Zizzamia
Copyright (c) 2024 Coinbase

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 91c2e8b

Please sign in to comment.