From 56fbcd0b67594b2bc3a68f08493b6f071bb8383f Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 9 Jul 2024 17:53:32 +0200 Subject: [PATCH] ci: add a code quality job --- .github/workflows/code-quality.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/code-quality.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 000000000..41332cbda --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,30 @@ +name: Test code quality + +on: + push: + pull_request: + branches: + - "*" + +jobs: + code-quality: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + + - name: Install pip and hatch + run: | + sudo apt-get install -y python3-pip + pip3 install hatch hatch-vcs + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-code-quality-${{ hashFiles('pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-code-quality- + + - name: Run Hatch lint + run: hatch run linting:all