Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Implement CI/CD Workflow Action #30

Open
Codehagen opened this issue May 18, 2024 · 0 comments
Open

Feature: Implement CI/CD Workflow Action #30

Codehagen opened this issue May 18, 2024 · 0 comments

Comments

@Codehagen
Copy link
Owner

Codehagen commented May 18, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant