From f287ee682c9183014e9b521ccf57b19cb23fb797 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 20 Dec 2022 16:31:13 +0000 Subject: [PATCH] Add Precommit test https://github.com/Open-Telecoms-Data/open-fibre-data-standard/issues/226 --- .github/workflows/precommit.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/precommit.yml diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml new file mode 100644 index 0000000..9d59de7 --- /dev/null +++ b/.github/workflows/precommit.yml @@ -0,0 +1,21 @@ +name: Precommit +on: [push, pull_request] + +jobs: + precommit: + name: Precommit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: x64 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + - run: pip install -r requirements.txt + - run: python manage.py pre-commit + - run: git diff --exit-code