You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ya...@apache.org on 2026/04/08 07:02:28 UTC
(airavata-portals) 18/21: ci: modernize GitHub workflow — uv, Python 3.12, ruff, ty
This is an automated email from the ASF dual-hosted git repository.
yasith pushed a commit to branch feat/sdk-facade-migration
in repository https://gitbox.apache.org/repos/asf/airavata-portals.git
commit b4f9fc848bc0f7599fc8e5866898e492a265f182
Author: yasithdev <ya...@icloud.com>
AuthorDate: Wed Apr 8 01:25:18 2026 -0500
ci: modernize GitHub workflow — uv, Python 3.12, ruff, ty
---
.../.github/workflows/build-and-test.yaml | 63 ++++++++--------------
1 file changed, 22 insertions(+), 41 deletions(-)
diff --git a/airavata-django-portal/.github/workflows/build-and-test.yaml b/airavata-django-portal/.github/workflows/build-and-test.yaml
index 9e3cc4e31..2a7343bcc 100644
--- a/airavata-django-portal/.github/workflows/build-and-test.yaml
+++ b/airavata-django-portal/.github/workflows/build-and-test.yaml
@@ -22,13 +22,13 @@ name: Build and Test
on: [push, pull_request]
jobs:
build-js:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - name: Use Node.js as specified in .nvmrc
- uses: actions/setup-node@v3
+ - uses: actions/checkout@v4
+ - name: Use Node.js 22
+ uses: actions/setup-node@v4
with:
- node-version-file: '.nvmrc'
+ node-version: '22'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Run ESLint on JavaScript code
@@ -36,11 +36,11 @@ jobs:
./lint_js.sh
- name: Build JavaScript code
run: |
- ./build_js.sh
+ yarn install --frozen-lockfile && yarn workspaces run build
- name: Run JavaScript unit tests
run: |
./test_js.sh
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
with:
name: built-javascript
path: |
@@ -53,56 +53,37 @@ jobs:
django_airavata/apps/workspace/static/django_airavata_workspace/wc
django_airavata/apps/dataparsers/static/django_airavata_dataparsers/dist
- build-js-windows:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v3
- - name: Use Node.js as specified in .nvmrc
- uses: actions/setup-node@v3
- with:
- node-version-file: '.nvmrc'
- cache: 'yarn'
- cache-dependency-path: '**/yarn.lock'
- - name: Build JavaScript code
- run: |
- build_js.bat
- shell: cmd
-
build:
- # ubuntu-22 doesn't support Python 3.6
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
needs: build-js
strategy:
matrix:
- python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
+ python-version: ["3.12"]
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
+ - name: Install uv
+ uses: astral-sh/setup-uv@v4
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- cache: pip
- cache-dependency-path: |
- requirements.txt
- requirements-dev.txt
- name: Install dependencies
- run: |
- pip install --upgrade pip setuptools wheel
- pip install -r requirements-dev.txt
+ run: uv sync --frozen
- name: Run Django Migrate and Check
run: |
cp django_airavata/settings_local.py.sample django_airavata/settings_local.py
- python manage.py migrate
- python manage.py check
- - name: Run flake8
- run: |
- flake8 .
+ uv run python manage.py migrate
+ uv run python manage.py check
+ - name: Lint
+ run: uv run ruff check django_airavata/
+ - name: Type check
+ run: uv run ty check
# Need the built frontend client code before running some of the Django tests
# that use the Django test Client
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: built-javascript
path: django_airavata
- name: Run Django unit tests
run: |
- ./runtests.py
+ uv run ./runtests.py