diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 000000000..61bd1ca8a --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -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