mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Migrate CI flows to using UV
This commit is contained in:
29
.github/workflows/django.yml
vendored
29
.github/workflows/django.yml
vendored
@@ -18,34 +18,37 @@ jobs:
|
|||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install libcairo2-dev
|
sudo apt-get install libcairo2-dev
|
||||||
- name: Set up Python
|
|
||||||
|
- name: "Set up Python"
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version-file: ".python-version"
|
||||||
cache: 'pipenv'
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: uv sync --locked --all-extras --dev
|
||||||
python3 -m pip install --upgrade pip pipenv
|
|
||||||
pipenv install -d
|
|
||||||
# if: steps.pcache.outputs.cache-hit != 'true'
|
|
||||||
- name: Cache Static Files
|
- name: Cache Static Files
|
||||||
id: static-cache
|
id: static-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: 'pipeline/built_assets'
|
path: 'pipeline/built_assets'
|
||||||
key: ${{ hashFiles('package-lock.json') }}-${{ hashFiles('pipeline/source_assets') }}
|
key: ${{ hashFiles('package-lock.json') }}-${{ hashFiles('pipeline/source_assets') }}
|
||||||
|
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
if: steps.static-cache.outputs.cache-hit != 'true'
|
if: steps.static-cache.outputs.cache-hit != 'true'
|
||||||
- run: node node_modules/gulp/bin/gulp build
|
- run: node node_modules/gulp/bin/gulp build
|
||||||
if: steps.static-cache.outputs.cache-hit != 'true'
|
if: steps.static-cache.outputs.cache-hit != 'true'
|
||||||
- name: Basic Checks
|
- name: Basic Checks
|
||||||
run: |
|
run: |
|
||||||
pipenv run pycodestyle . --exclude=migrations,node_modules
|
uv run pycodestyle . --exclude=migrations,node_modules
|
||||||
pipenv run python3 manage.py check
|
uv run python3 manage.py check
|
||||||
pipenv run python3 manage.py makemigrations --check --dry-run
|
uv run python3 manage.py makemigrations --check --dry-run
|
||||||
pipenv run python3 manage.py collectstatic --noinput
|
uv run python3 manage.py collectstatic --noinput
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: pipenv run pytest -n auto --cov
|
run: uv run pytest -n auto --cov
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
@@ -53,4 +56,4 @@ jobs:
|
|||||||
path: screenshots/
|
path: screenshots/
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
- name: Coveralls
|
- name: Coveralls
|
||||||
run: pipenv run coveralls --service=github
|
run: uv run coveralls --service=github
|
||||||
|
|||||||
Reference in New Issue
Block a user