feat(workflow): move to uv
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 32s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 35s

This commit is contained in:
Seaswimmer 2024-10-10 16:03:50 -04:00
parent 8b6d269e1a
commit 23f2aaa2ee
Signed by: CoastalCommitsManagement
GPG key ID: 7E73189F651A553F

View file

@ -1,39 +1,46 @@
name: Actions name: Actions
on: on:
push: push:
branches:
- 'main'
pull_request: pull_request:
jobs: jobs:
Lint Code (Ruff & Pylint): lint:
name: Lint Code (Ruff & Pylint)
runs-on: docker runs-on: docker
container: www.coastalcommits.com/cswimr/actions:seacogs container: www.coastalcommits.com/cswimr/actions:uv
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install python
run: uv python install 3.11
- name: Install dependencies - name: Install dependencies
run: poetry install --with dev --no-root run: uv sync
- name: Analysing code with Ruff - name: Analysing code with Ruff
run: ./.venv/bin/ruff check $(git ls-files '*.py') run: uv run ruff check $(git ls-files '*.py')
continue-on-error: true continue-on-error: true
- name: Analysing code with Pylint - name: Analysing code with Pylint
run: ./.venv/bin/pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py') run: uv run pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
Build Documentation (MkDocs): docs:
name: Build Documentation (MkDocs)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: docker runs-on: docker
container: www.coastalcommits.com/cswimr/actions:seacogs container: www.coastalcommits.com/cswimr/actions:docs
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install python
run: uv python install 3.11
- name: Install dependencies - name: Install dependencies
run: poetry install --with docs --no-root run: uv sync --no-dev --extra=documentation
- name: Set environment variables - name: Set environment variables
uses: actions/env@v2 uses: actions/env@v2
@ -42,7 +49,7 @@ jobs:
run: | run: |
export SITE_URL="https://$CI_ACTION_REF_NAME_SLUG.seacogs.coastalcommits.com" export SITE_URL="https://$CI_ACTION_REF_NAME_SLUG.seacogs.coastalcommits.com"
export EDIT_URI="src/branch/$CI_ACTION_REF_NAME/.docs" export EDIT_URI="src/branch/$CI_ACTION_REF_NAME/.docs"
./.venv/bin/mkdocs build -v uv run mkdocs build -v
- name: Deploy documentation - name: Deploy documentation
run: | run: |