diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml new file mode 100644 index 0000000..db58c47 --- /dev/null +++ b/.github/workflows/pre_commit.yml @@ -0,0 +1,24 @@ +name: Pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pre-commit + - name: Run pre-commit + run: | + pre-commit run --all-files \ No newline at end of file diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml deleted file mode 100644 index 3295653..0000000 --- a/.github/workflows/run-test.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: pre-commit - -on: - pull_request: - push: - branches: [ main, master ] - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - cache: 'pip' # caching pip dependencies - - run: pip install -r requirements.txt \ No newline at end of file