Skip to content

Commit

Permalink
feat: git workflows (#6)
Browse files Browse the repository at this point in the history
# 🤖 Linear

Closes ZKS-41
  • Loading branch information
0xkenj1 authored May 23, 2024
1 parent 4ac04e4 commit 5aaecaf
Show file tree
Hide file tree
Showing 6 changed files with 994 additions and 0 deletions.
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 @@
# 🤖 Linear

Closes ZKS-XXX

## Description
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build

on:
workflow_call:

jobs:
build:
name: Run Build
runs-on: ubuntu-latest

steps:
- name: Check out github repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"

- name: Install dependencies
run: yarn --immutable

- name: Run Build
run: yarn build
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint

on:
workflow_call:

jobs:
commitlint:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5

lint:
name: Run Linters
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"

- name: Install dependencies
run: yarn --immutable

- name: Run Prettier
run: yarn prettier

- name: Run Linter
run: yarn lint
24 changes: 24 additions & 0 deletions .github/workflows/main-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Main Workflow

on:
pull_request:
types: [opened, synchronize]
branches:
- dev
- main

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

jobs:
build:
uses: ./.github/workflows/build.yml

lint:
uses: ./.github/workflows/lint.yml
needs: build

test:
uses: ./.github/workflows/test.yml
needs: lint
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests

on:
workflow_call:

jobs:
unit:
name: Run unit tests
runs-on: ubuntu-latest

steps:
- name: Check out github repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"

- name: Install dependencies
run: yarn --immutable

- name: Run tests
run: yarn test
875 changes: 875 additions & 0 deletions .yarn/releases/yarn-3.8.2.cjs

Large diffs are not rendered by default.

0 comments on commit 5aaecaf

Please sign in to comment.