Skip to content

Commit

Permalink
Revisit pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed May 28, 2024
1 parent 5ff4885 commit a822395
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 86 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/actions.yaml → .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,13 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
pip install coverage coveralls
pip install '.[dev]'
- name: mypy
run: |
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional src/nomad_simulations tests
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional src/pyssmf tests
- name: Test with pytest
run: |
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
python -m pytest -sv tests
build-and-install:
runs-on: ubuntu-latest
steps:
Expand All @@ -41,7 +34,7 @@ jobs:
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
pip install dist/*.tar.gz
ruff-linting:
runs-on: ubuntu-latest
steps:
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/mkdocs-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
name: deploy-mkdocs

on:
push:
branches:
- develop # Triggers deployment on push to the main branch

jobs:
deploy:
runs-on: ubuntu-latest

needs: build # This ensures that the deployment job runs after the build job
if: github.ref == 'refs/heads/develop' # Only deployed for the develop branch
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

python-version: 3.9
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
mkdocs-bibtex-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material==8.1.1 pymdown-extensions mkdocs-click
- name: Build and Deploy
- name: Build MKDocs Documentation
run: mkdocs build --verbose
- name: Deploy MKDocs to GitHub Pages
run: |
mkdocs gh-deploy --config-file ../nomad-schema-plugin-simulation-data/mkdocs.yml --force --remote-branch gh-pages
if [ -n "$GITHUB_TOKEN" ]; then
mkdocs gh-deploy --force
else
echo "Set the GH_PAGES_TOKEN secret in your repository for deploying to GitHub Pages."
exit 1
fi
env:
GITHUB_TOKEN: ${{ secrets.GH_PAGES_TOKEN }}
4 changes: 1 addition & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Upload python package to pypi server and github release.
# Reference: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

name: Upload Python Package

name: upload-to-pypi
on:
release:
types: [published]

jobs:
# publish-to-pypi:
# name: >-
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows2/build.yml

This file was deleted.

0 comments on commit a822395

Please sign in to comment.