From cfa4c59b04f286594b457a9fd60bc47b2038d7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=EC=95=84=EB=A6=BC?= Date: Fri, 19 Jul 2024 00:51:32 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20ci=20pipeline=20=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ install_dependencies.sh | 12 ++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 install_dependencies.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..160b6de --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.12 + + - name: Install dependencies + run: | + bash install_dependencies.sh + + - name: Run pre-commit + run: | + pre-commit run --all-files diff --git a/install_dependencies.sh b/install_dependencies.sh new file mode 100644 index 0000000..395af8a --- /dev/null +++ b/install_dependencies.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# python3 또는 python 명령어를 찾습니다. +PYTHON=$(command -v python3 || command -v python) +PIP="$PYTHON -m pip" + +$PIP install --upgrade pip +$PIP install pre-commit +$PIP install black +$PIP install flake8