8000 update CI/CD workflows by lukaspie · Pull Request #589 · FAIRmat-NFDI/pynxtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

update CI/CD workflows #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ name: build_and_deploy_mkdocs
on:
push:
branches:
- master # Triggers deployment on push to the main branch

env:
UV_SYSTEM_PYTHON: true
- master # Triggers deployment on push to the master branch

permissions:
contents: write
Expand All @@ -27,10 +24,10 @@ jobs:
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv and set the python version to 3.11
uses: astral-sh/setup-uv@v5
with:
python-version: '3.x'
python-version: 3.11

- name: Cache mkdocs-material environment
uses: actions/cache@v3
Expand All @@ -42,7 +39,6 @@ jobs:

- name: Install Dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install --no-cache-dir ".[docs]"

- name: Build and Deploy
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/nomad-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
# - 'dev-requirements.txt'

env:
UV_SYSTEM_PYTHON: true
python-version: 3.11

jobs:
validate_dependencies:
Expand All @@ -28,26 +28,21 @@ jobs:
git clone --depth 1 --branch develop --recurse-submodules https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git nomad
git submodule update --init --recursive --depth 1

- name: Replace pynxtools dependency in NOMAD pyproject.toml
- name: Add pynxtools dependency in NOMAD test_plugins.txt
working-directory: ./nomad
run: |
sed -i 's|pynxtools\[convert\]==[0-9]\+\(\.[0-9]\+\)\+\([0-9]\)|pynxtools\[convert\]@git+https://github.com/FAIRmat-NFDI/pynxtools.git@${{ github.head_ref || github.ref_name }} |' default_plugins.txt
- name: Set up Python
uses: actions/setup-python@v5
echo "" >> test_plugins.txt
echo "pynxtools[convert]@git+https://github.com/FAIRmat-NFDI/pynxtools.git@${{ github.head_ref || github.ref_name }}" >> test_plugins.txt
- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: '3.11'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh

python-version: ${{ env.python-version }}
- name: Generate (dev-)requirements.txt from modified pyproject.toml
working-directory: ./nomad
run: |
uv pip compile --universal -p 3.11 --annotation-style=line --extra=infrastructure --extra=parsing --output-file=requirements.txt pyproject.toml
uv pip compile --universal -p 3.11 --annotation-style=line --extra=dev --extra=infrastructure --extra=parsing --output-file=requirements-dev.txt requirements.txt pyproject.toml
uv pip compile --universal -p 3.11 --annotation-style=line --output-file=requirements-plugins.txt --unsafe-package nomad-lab -c requirements-dev.txt default_plugins.txt

uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --extra=infrastructure --extra=parsing --output-file=requirements.txt pyproject.toml
uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --extra=dev --extra=infrastructure --extra=parsing --output-file=requirements-dev.txt requirements.txt pyproject.toml
uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --output-file=requirements-plugins.txt --unsafe-package nomad-lab -c requirements-dev.txt test_plugins.txt
- name: Install NOMAD dependencies with pynxtools from current branch
working-directory: ./nomad
run: |
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/plugin_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches: [master]

env:
UV_SYSTEM_PYTHON: true
python-version: 3.11

jobs:
pytest:
Expand Down Expand Up @@ -49,18 +49,17 @@ jobs:
tests_to_run: tests/.

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python 3.11
uses: actions/setup-python@v5
- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: 3.11
python-version: ${{ env.python-version }}
- name: Install dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install --system coverage coveralls
uv pip install coverage coveralls
- name: Install package
run: |
uv pip install ".[dev]"
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/publish.yml
8000
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [published]

env:
UV_SYSTEM_PYTHON: true
python-version: 3.11

jobs:
deploy:
Expand All @@ -21,13 +21,12 @@ jobs:
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: "3.x"
python-version: ${{ env.python-version }}
- name: Install dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install build
- name: Git tag version
id: git_tag_version
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,24 @@ name: linting
on: [push]

env:
UV_SYSTEM_PYTHON: true
python-version: 3.11

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
python-version: ${{ env.python-version }}
- name: Install dependencies
run: |
git submodule sync --recursive
git submodule update --init --recursive --jobs=4
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install package
- name: Install package and dev requirements
run: |
uv pip install --no-deps .
- name: Install dev requirements
run: |
uv pip install -r dev-requirements.txt
uv pip install .[dev]
- name: ruff check
run: |
ruff check src/pynxtools tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
coveralls --service=github
Loading
0