Skip to content

Commit

Permalink
Merge pull request #75 from Kiwari-Labs/update-ci
Browse files Browse the repository at this point in the history
ci: enforce formatting, testing, wip, and security checks [WIP]
  • Loading branch information
MASDXI authored Feb 19, 2025
2 parents 0f0ac43 + 5a09a89 commit cb0c757
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Setup
description: Common environment setup

runs:
using: composite
steps:
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/cache@v4
id: cache
with:
path: '**/node_modules'
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
33 changes: 33 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: checks

on:
push:
branches:
- main
pull_request: {}

jobs:
format-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/setup
- run: yarn format

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/setup
- name: Run tests
run: yarn test

slither:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/setup
- uses: crytic/[email protected]
13 changes: 13 additions & 0 deletions .github/workflows/wip-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: WIP
on:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
check-wip:
runs-on: ubuntu-latest
steps:
- name: WIP Check
uses: wip/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cb0c757

Please sign in to comment.