Skip to content

Commit

Permalink
Merge pull request #2 from nomad-coe/package
Browse files Browse the repository at this point in the history
Package
  • Loading branch information
ladinesa authored Mar 12, 2024
2 parents 330abe1 + a4b6b38 commit bf69fd3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/python-actions.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: python

name: install-and-test-workflow
on: [push]

jobs:
build:
install-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -14,15 +12,39 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[dev]
# we need the latest nomad version for testing
pip install nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop
pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
pip install coverage coveralls
- name: mypy
run: |
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional simulationparsers
- name: Test with pytest
if: success() || failure()
run: |
python -m pytest -sv tests
python -m coverage run -m pytest -sv tests
- name: Submit to coveralls
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
build-and-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build the package
run: |
pip install --upgrade pip
pip install build
python -m build --sdist
- name: Install the package
run: |
pip install dist/*.tar.gz --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
ruff:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ readme = "README.md"
authors = [{ name = "The NOMAD Authors" }]
license = { file = "LICENSE" }
dependencies = [
"nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop",
"nomad-lab>=1.2.0",
"nomad-schema-plugin-run@git+https://github.com/nomad-coe/nomad-schema-plugin-run.git@develop",
]

Expand Down

0 comments on commit bf69fd3

Please sign in to comment.