From 38c1ca7ce77ab6dd79088db00dbd66459c2d4420 Mon Sep 17 00:00:00 2001 From: Madison Swain-Bowden Date: Wed, 14 Dec 2022 15:54:50 -0800 Subject: [PATCH] Install pre-commit as a prereq for dag doc generation --- .github/workflows/ci_cd.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 6d98b0815..9910a36d7 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -105,6 +105,26 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Python version + id: python-version + run: echo "value=$(just py-version)" >> "$GITHUB_OUTPUT" + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "${{ steps.python-version.outputs.value }}" + + - name: Cache pre-commit envs + uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} + + - name: Install pre-commit + # This is required for the DAG doc check step only. If that step gets split out, + # this and the above steps setting up python are not needed for tests. + run: pip install pre-commit + - name: Change permissions for Docker steps run: chmod -R 777 openverse_catalog/ tests/