feat(workflow): merged the pylint and build-docs workflows into a single workflow

This commit is contained in:
SeaswimmerTheFsh 2024-01-06 17:41:11 +00:00
parent fd60adc2ae
commit b7c50f6cf1
Signed by untrusted user: cswimr
GPG key ID: D74DDDDF420E13DF
2 changed files with 8 additions and 31 deletions

View file

@ -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')

View file

@ -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')