From b7c50f6cf194bec66763c56f0ed92f330c82ffba Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 6 Jan 2024 17:41:11 +0000 Subject: [PATCH] feat(workflow): merged the pylint and build-docs workflows into a single workflow --- .forgejo/workflows/pylint.yaml | 28 ------------------- .../{build-docs.yaml => workflow.yaml} | 11 ++++++-- 2 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 .forgejo/workflows/pylint.yaml rename .forgejo/workflows/{build-docs.yaml => workflow.yaml} (80%) diff --git a/.forgejo/workflows/pylint.yaml b/.forgejo/workflows/pylint.yaml deleted file mode 100644 index 505a550..0000000 --- a/.forgejo/workflows/pylint.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Pylint -on: [push, pull_request] - -jobs: - Lint Code with Pylint: - runs-on: docker - strategy: - matrix: - python-version: ["3.11"] - container: catthehacker/ubuntu:act-latest - steps: - - name: Checkout - uses: actions/checkout@v3.6.0 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install Poetry - run: curl -sSL https://cdn.seaswimmer.cc/go/poetry | python${{ matrix.python-version }} - - - name: Install dependencies - run: | - export PATH="$HOME/.local/bin:$PATH" - poetry env use ${{ matrix.python-version }} - poetry install --with dev - - name: Analysing the code with Pylint - run: | - export PATH="$HOME/.local/bin:$PATH" - poetry run pylint --rcfile .forgejo/workflows/config/.pylintrc $(git ls-files '*.py') diff --git a/.forgejo/workflows/build-docs.yaml b/.forgejo/workflows/workflow.yaml similarity index 80% rename from .forgejo/workflows/build-docs.yaml rename to .forgejo/workflows/workflow.yaml index 0166005..c54cc71 100644 --- a/.forgejo/workflows/build-docs.yaml +++ b/.forgejo/workflows/workflow.yaml @@ -1,8 +1,8 @@ -name: Build Documentation +name: Build Documentation and Lint Code on: [push, pull_request] jobs: - Build Documentation and Push to CoastalCommits Pages: + build and lint: runs-on: docker container: catthehacker/ubuntu:act-latest steps: @@ -35,7 +35,7 @@ jobs: run: | export PATH="$HOME/.local/bin:$PATH" poetry config virtualenvs.create false - poetry install --with docs --no-root + poetry install --with docs --with dev --no-root - name: Build the documentation run: | export PATH="$HOME/.local/bin:$PATH" @@ -49,3 +49,8 @@ jobs: --release "$GITEA_SHA" env: GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }} + continue-on-error: true + - name: Analysing the code with Pylint + run: | + export PATH="$HOME/.local/bin:$PATH" + poetry run pylint --rcfile .forgejo/workflows/config/.pylintrc $(git ls-files '*.py')