forked from cswimr/SeaCogs
feat(workflow): merged the pylint and build-docs workflows into a single workflow
This commit is contained in:
parent
fd60adc2ae
commit
b7c50f6cf1
2 changed files with 8 additions and 31 deletions
|
@ -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')
|
|
|
@ -1,8 +1,8 @@
|
||||||
name: Build Documentation
|
name: Build Documentation and Lint Code
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build Documentation and Push to CoastalCommits Pages:
|
build and lint:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container: catthehacker/ubuntu:act-latest
|
container: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -35,7 +35,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
poetry config virtualenvs.create false
|
poetry config virtualenvs.create false
|
||||||
poetry install --with docs --no-root
|
poetry install --with docs --with dev --no-root
|
||||||
- name: Build the documentation
|
- name: Build the documentation
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
@ -49,3 +49,8 @@ jobs:
|
||||||
--release "$GITEA_SHA"
|
--release "$GITEA_SHA"
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }}
|
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')
|
Loading…
Reference in a new issue