forked from cswimr/SeaCogs
feat(workflow): move to uv
This commit is contained in:
parent
8b6d269e1a
commit
23f2aaa2ee
1 changed files with 18 additions and 11 deletions
|
@ -1,39 +1,46 @@
|
|||
name: Actions
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
Lint Code (Ruff & Pylint):
|
||||
lint:
|
||||
name: Lint Code (Ruff & Pylint)
|
||||
runs-on: docker
|
||||
container: www.coastalcommits.com/cswimr/actions:seacogs
|
||||
container: www.coastalcommits.com/cswimr/actions:uv
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install python
|
||||
run: uv python install 3.11
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install --with dev --no-root
|
||||
run: uv sync
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
container: www.coastalcommits.com/cswimr/actions:seacogs
|
||||
container: www.coastalcommits.com/cswimr/actions:docs
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install python
|
||||
run: uv python install 3.11
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install --with docs --no-root
|
||||
run: uv sync --no-dev --extra=documentation
|
||||
|
||||
- name: Set environment variables
|
||||
uses: actions/env@v2
|
||||
|
@ -42,7 +49,7 @@ jobs:
|
|||
run: |
|
||||
export SITE_URL="https://$CI_ACTION_REF_NAME_SLUG.seacogs.coastalcommits.com"
|
||||
export EDIT_URI="src/branch/$CI_ACTION_REF_NAME/.docs"
|
||||
./.venv/bin/mkdocs build -v
|
||||
uv run mkdocs build -v
|
||||
|
||||
- name: Deploy documentation
|
||||
run: |
|
||||
|
|
Loading…
Reference in a new issue