From 8b33d169323380023400a87c1d11aba10ad30174 Mon Sep 17 00:00:00 2001 From: serramatutu Date: Mon, 17 Jun 2024 15:04:38 +0200 Subject: [PATCH] ci(quality): add CI for code quality This commit adds Ruff, Basedpyright and pytest to CI. --- .github/workflows/code-quality.yaml | 24 ++++++++++++++++++++++++ .github/workflows/publish.yaml | 3 +-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/code-quality.yaml diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml new file mode 100644 index 0000000..ec67edd --- /dev/null +++ b/.github/workflows/code-quality.yaml @@ -0,0 +1,24 @@ +name: Code quality +on: + pull_request: + +jobs: + code-quality: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: ./.github/actions/setup-python-env + + - name: ruff + run: "hatch run dev:ruff format --check" + + - name: basedpyright + run: "hatch run dev:basedpyright" + + - name: fetch server schema + run: "hatch run dev:fetch-schema" + + - name: basedpyright + run: "hatch run test:run" + diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 79d8965..16d102d 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -17,8 +17,7 @@ jobs: id-token: write steps: - - name: Check-out the repo - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python ${{ env.PYTHON_VERSION }} environment uses: ./.github/actions/setup-python-env