Skip to content

Commit

Permalink
trunk setup & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Pckool committed Dec 2, 2022
1 parent 5126fab commit a014bf2
Show file tree
Hide file tree
Showing 54 changed files with 3,818 additions and 2,951 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
on:
release:
release:
types: [created]
workflow_dispatch:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
on:
pull_request:
workflow_dispatch:
pull_request:
workflow_dispatch:

jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-module
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- name: Install Dependencies
run: yarn install
- name: Yarn Build
run: yarn build
- name: Test
run: yarn test
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-module
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- name: Install Dependencies
run: yarn install

- name: Yarn Build
run: yarn build

- name: Test
run: yarn test
43 changes: 43 additions & 0 deletions .github/workflows/trunk-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Trunk Nightly
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
schedule:
- cron: 0 8 * * 1-5
workflow_dispatch: {}

jobs:
trunk_check:
name: Trunk Check Runner
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-module
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- name: Install Dependencies
run: yarn install
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/trunk.pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Pull Request
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
trunk_check:
name: Trunk Check Runner
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-module
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- name: Install Dependencies
run: yarn install
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}

on:
[pull_request]
# branches:
# - main
# - dev
31 changes: 15 additions & 16 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"useTabs": true,
"overrides": [
{
"files": ["*.yml", "*.yaml"],
"options": {
"tabWidth": 2,
"useTabs": false
}
}

]
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"useTabs": true,
"overrides": [
{
"files": ["*.yml", "*.yaml"],
"options": {
"tabWidth": 2,
"useTabs": false
}
}
]
}
7 changes: 7 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*out
*logs
*actions
*notifications
plugins
user_trunk.yaml
user.yaml
10 changes: 10 additions & 0 deletions .trunk/config/.markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Autoformatter friendly markdownlint config (all formatting rules disabled)
default: true
blank_lines: false
bullet: false
html: false
indentation: false
line_length: false
spaces: false
url: false
whitespace: false
14 changes: 14 additions & 0 deletions .trunk/config/svgo.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false, // https://github.com/svg/svgo/issues/1128
sortAttrs: true,
removeOffCanvasPaths: true,
},
},
},
],
}
25 changes: 25 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 0.1
cli:
version: 1.1.0
plugins:
sources:
- id: trunk
ref: v0.0.6
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
runtimes:
enabled:
- [email protected]
- [email protected]
actions:
enabled:
- trunk-announce
- trunk-check-pre-push
- trunk-upgrade-available
2 changes: 1 addition & 1 deletion docs/blog/04-05-2022_first-release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: First Major Release
description: plexusjs releases version 1.0.0
tags: [major, release, first, build]
authors:
- phil
- phil
---

Hey guys! Sorry it took so long, but <mark><strong>the stable first version of Plexus is live!</strong></mark> This is the groundwork for a ton of future ideas we have for this project.
Expand Down
16 changes: 8 additions & 8 deletions docs/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
phil:
name: Philippe Clesca
title: Lead Maintainer of Plexus
url: https://github.com/Pckool
image_url: https://github.com/Pckool.png
name: Philippe Clesca
title: Lead Maintainer of Plexus
url: https://github.com/Pckool
image_url: https://github.com/Pckool.png

nico:
name: Nico Bellic
title: Lead Maintainer of Plexus
url: https://github.com/itsRems
image_url: https://github.com/itsRems.png
name: Nico Bellic
title: Lead Maintainer of Plexus
url: https://github.com/itsRems
image_url: https://github.com/itsRems.png
Loading

0 comments on commit a014bf2

Please sign in to comment.