Dingify
Dingify copied to clipboard
Feature: Implement CI/CD Workflow Action
Type of feature
🔄 CI/CD
Current behavior
We need to set up a Continuous Integration (CI) workflow action for our project. Currently, there is no automated process for linting, formatting, and type checking our code.
Suggested solution
Implement a GitHub Actions workflow for Continuous Integration (CI) to automate linting, formatting, and type checking of our codebase. The workflow should be triggered on pull requests and pushes to the main branch, as well as merge groups.
Example under:
CI Workflow YAML
name: CI
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
merge_group:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Copy env
shell: bash
run: cp .env.example .env.local
- name: Lint
run: pnpm lint && pnpm lint:ws
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Format
run: pnpm format
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/github/setup
- name: Typecheck
run: pnpm typecheck