Skip to content

Commit

Permalink
pre-commit ci-cd
Browse files Browse the repository at this point in the history
  • Loading branch information
azliu0 committed Apr 14, 2024
1 parent e5d4ee4 commit 8c1aef2
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI/CD

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
pre-commit:
name: run pre-commit

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "pip"

- name: Install pre-commit
run: python -m pip install pre-commit
shell: bash

- name: Cache pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}

- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
shell: bash

0 comments on commit 8c1aef2

Please sign in to comment.