Skip to content

Commit

Permalink
Merge pull request #6 from axone-protocol/ci/install-ci
Browse files Browse the repository at this point in the history
Setup CI
  • Loading branch information
ccamel authored Apr 2, 2024
2 parents ddac5f8 + 200b7ff commit abdfdcf
Show file tree
Hide file tree
Showing 74 changed files with 1,247 additions and 708 deletions.
60 changes: 59 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
{
"extends": "next/core-web-vitals"
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended"
],
"plugins": [ "@stylistic/eslint-plugin-js"],
"rules": {
"space-before-blocks": "error",
"space-before-function-paren": "error",
"@stylistic/js/indent": ["error", 2],
"@stylistic/js/object-curly-spacing": ["error", "always"],
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"semi": ["error", "always"],
"quotes": ["error", "single"],
"jsx-quotes": ["error", "prefer-single"],
"sort-imports": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true
}
],
"import/order": [
1,
{
"groups": [
"external",
"builtin",
"internal",
"sibling",
"parent",
"index"
],
"pathGroups": [
{
"pattern": "components",
"group": "internal"
},
{
"pattern": "common",
"group": "internal"
},
{
"pattern": "routes/**",
"group": "internal"
},
{
"pattern": "assets/**",
"group": "internal",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["internal"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
reviewers:
- amimart
- ccamel
assignees:
- amimart
- ccamel
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
reviewers:
- amimart
- ccamel
assignees:
- amimart
- ccamel
open-pull-requests-limit: 5
16 changes: 16 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Add to project

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/axone-protocol/projects/2
github-token: ${{ secrets.OPS_TOKEN }}
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build

on:
pull_request:
branches:
- main

push:
branches:
- main

workflow_call:

workflow_dispatch:

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Setup node environment (for building)
uses: actions/setup-node@v4
with:
node-version: '18.20'
cache: yarn

- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Fetch dependencies
run: |
yarn --frozen-lockfile
- name: Build
run: |
yarn build
15 changes: 15 additions & 0 deletions .github/workflows/follow-contributors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Follow contributor

on:
pull_request:
branches: [main]

jobs:
follow-user:
runs-on: ubuntu-22.04
steps:
- name: Follow user
uses: okp4/[email protected]
with:
username: ${{ github.event.pull_request.user.login }}
token: ${{ secrets.OPS_TOKEN }}
152 changes: 152 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: Lint

on:
push:
branches: [main]

pull_request:
branches: [main]

workflow_call:

workflow_dispatch:

concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-commits:
runs-on: ubuntu-22.04
if: github.actor != 'dependabot[bot]'
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check commits
uses: wagoid/commitlint-github-action@v5

lint-markdown:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Lint markdown files
uses: avto-dev/[email protected]
with:
args: "**/*.md"

lint-yaml:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Lint yaml files
uses: ibiqlik/[email protected]

lint-ts:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Setup node environment (for building)
uses: actions/setup-node@v4
with:
node-version: "18.20"
cache: yarn

- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Fetch dependencies
run: |
yarn --frozen-lockfile
- name: Fetch dependencies
run: |
yarn lint
report-new-dependencies:
runs-on: ubuntu-22.04
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Check for new dependencies
uses: hiwelo/[email protected]
with:
token: ${{ secrets.OPS_TOKEN }}

lint-branch-name:
runs-on: ubuntu-22.04
if: github.actor != 'dependabot[bot]' && github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')
steps:
- name: Check branch name conventions
uses: AlbertHernandez/[email protected]
with:
branch_pattern: "feat|fix|build|ci|docs|style|refactor|perf|test|chore"
comment_for_invalid_branch_name: |
🙋‍ Oops! This branch name does not follow the naming convention.
<hr>
Please, see the following branch naming convention:
Branch naming convention | Purpose
------------------------ | -------
`feat/**` | A new feature
`fix/**` | A bug fix
`build/**` | Changes that affect the build system (npm, mavem, poetry)
`ci/**` | Changes to the CI configuration
`docs/**` | Documentation only changes
`style/**` | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
`refactor/**` | Code changes that neither fixe a bug nor adds a feature
`perf/**` | Code changes that improve performance
`test/**` | When adding tests or correcting existing tests
`chore/**` | Other changes that don't modify source
fail_if_invalid_branch_name: "true"
ignore_branch_pattern: "main"
- name: Close non-compliant branch
if: ${{ failure() }}
uses: codelytv/no-pull-requests@v1
with:
GITHUB_TOKEN: ${{ secrets.OPS_TOKEN }}
message: 🙅 Closing the PR because it does not respect naming conventions. Edit the branch name and submit a new PR.
env:
GITHUB_TOKEN: ${{ secrets.OPS_TOKEN }}

lint-image:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Lint image files
run: |
FAILED=0
for file in $(find "$CONTENT_FOLDER" -regextype posix-egrep -regex '.+\.(bmp|ico|jpg|jpeg|png|svg|webp)'); do
type=$(identify $file | awk '{print $2}')
if [[ $type =~ ^(WEBP|SVG|ICO)$ ]]; then
echo "✅ $file"
else
>&2 echo "❌ $file incorrect. Please use only webp or svg format 🙏"
FAILED=1
fi
done
if [ "${FAILED}" = "1" ]; then
exit 1
fi
env:
CONTENT_FOLDER: ./public/images
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup node environment (for building)
uses: actions/setup-node@v4
with:
node-version: 18.19
node-version: '18.20'
cache: yarn

- name: Fetch dependencies
Expand Down
4 changes: 4 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line-length: false
no-hard-tabs: false
no-inline-html: false
first-line-h1: false
9 changes: 9 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: default
rules:
document-start: disable
line-length:
max: 160
level: warning
brackets:
min-spaces-inside: 0
max-spaces-inside: 1
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Axone Website

[![lint](https://img.shields.io/github/actions/workflow/status/axone-protocol/website/lint.yml?branch=main&label=lint&style=for-the-badge&logo=github)](https://github.com/axone-protocol/website/actions/workflows/lint.yml)
[![build](https://img.shields.io/github/actions/workflow/status/axone-protocol/website/build.yml?branch=main&label=build&style=for-the-badge&logo=github)](https://github.com/axone-protocol/website/actions/workflows/build.yml)
[![conventional commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=for-the-badge&logo=conventionalcommits)](https://conventionalcommits.org)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge)](https://github.com/semantic-release/semantic-release)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](https://github.com/axone-protocol/.github/blob/main/CODE_OF_CONDUCT.md)
[![license][bsd-3-clause-image]][bsd-3-clause]
[![cc-by-sa-4.0][cc-by-sa-image]][cc-by-sa]

> Official Axone Website repository.
## Overview
Expand Down Expand Up @@ -27,4 +35,6 @@ All the code in this repository is open source and [3-Clause BSD][bsd-3-clause]
The assets (markdown documentation, images, etc.) are [Creative Commons Attribution-ShareAlike 4.0 International][cc-by-sa] licensed.

[bsd-3-clause]: https://opensource.org/licenses/BSD-3-Clause
[bsd-3-clause-image]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg?style=for-the-badge
[cc-by-sa]: https://creativecommons.org/licenses/by-sa/4.0/
[cc-by-sa-image]: https://i.creativecommons.org/l/by-sa/4.0/88x31.png
20 changes: 10 additions & 10 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type { Metadata } from "next";
import OrchestrationSection from "app/ui/about/orchestration/section";
import ResourcesSection from "app/ui/about/resources/section";
import VisionSection from "app/ui/about/vision/section";
import CoordinationSection from "app/ui/about/coordination/section";
import PurposeSection from "app/ui/about/purpose/section";
import AboutAxoneSection from "app/ui/about/axone/section";
import type { Metadata } from 'next';
import AboutAxoneSection from 'ui/about/axone/section';
import CoordinationSection from 'ui/about/coordination/section';
import OrchestrationSection from 'ui/about/orchestration/section';
import PurposeSection from 'ui/about/purpose/section';
import ResourcesSection from 'ui/about/resources/section';
import VisionSection from 'ui/about/vision/section';

export const metadata: Metadata = {
title: "Axone - About us",
title: 'Axone - About us',
description:
"Axone is an open network that lets users buy or sell any off-chain resource securely and efficiently",
'Axone is an open network that lets users buy or sell any off-chain resource securely and efficiently',
};

export default function About() {
export default function About () {
return (
<>
<OrchestrationSection />
Expand Down
Loading

0 comments on commit abdfdcf

Please sign in to comment.