From 6d9b1c33b891f33f111ef0da63075fb2948bc764 Mon Sep 17 00:00:00 2001 From: Pepe Marquez Date: Thu, 16 May 2024 18:04:19 +0200 Subject: [PATCH] Update actions and remove previous workflow. --- .github/{workflows => }/dependabot.yml | 0 .github/workflows/actions.yml | 67 +++++++++++++++++++ .../{workflows => }/cruft-update.yml | 0 .../{workflows => }/mkdocs-deploy.yml | 0 .github/workflows/test.yaml | 43 ------------ .github/workflows/workflows/actions.yml | 56 ---------------- 6 files changed, 67 insertions(+), 99 deletions(-) rename .github/{workflows => }/dependabot.yml (100%) create mode 100644 .github/workflows/actions.yml rename .github/workflows/{workflows => }/cruft-update.yml (100%) rename .github/workflows/{workflows => }/mkdocs-deploy.yml (100%) delete mode 100644 .github/workflows/test.yaml delete mode 100644 .github/workflows/workflows/actions.yml diff --git a/.github/workflows/dependabot.yml b/.github/dependabot.yml similarity index 100% rename from .github/workflows/dependabot.yml rename to .github/dependabot.yml diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 0000000..f7a30c8 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,67 @@ +name: install-and-test-workflow + +on: [push] + +jobs: + install-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - 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 + - name: Test with pytest + run: | + python -m coverage run -m pytest -sv + - name: Submit to coveralls + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + coveralls --service=github + - name: Test with nomad + run: | + python -m nomad.cli parse tests/data/example.archive.json + + build-and-install: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + 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 + - name: Test with nomad + run: | + python -m nomad.cli parse tests/data/example.archive.json + + ruff-linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 + with: + args: "check ." + + # to enable auto-formatting check, uncomment the following lines below + # ruff-formatting: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: chartboost/ruff-action@v1 + # with: + # args: "format . --check" diff --git a/.github/workflows/workflows/cruft-update.yml b/.github/workflows/cruft-update.yml similarity index 100% rename from .github/workflows/workflows/cruft-update.yml rename to .github/workflows/cruft-update.yml diff --git a/.github/workflows/workflows/mkdocs-deploy.yml b/.github/workflows/mkdocs-deploy.yml similarity index 100% rename from .github/workflows/workflows/mkdocs-deploy.yml rename to .github/workflows/mkdocs-deploy.yml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index bbc4c58..0000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: install-and-test-workflow -on: [push] -jobs: - install-and-test: - 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: Install dependencies - run: | - pip install --upgrade pip - pip install poetry - poetry install - - name: Test with pytest - run: | - python -m pytest -sv tests - - name: Test with nomad - run: | - python -m nomad.cli parse tests/data/example.archive.json - 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 --extra-index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple - pip install poetry - poetry install - - name: Test with nomad - run: | - python -m nomad.cli parse tests/data/example.archive.json diff --git a/.github/workflows/workflows/actions.yml b/.github/workflows/workflows/actions.yml deleted file mode 100644 index 544ec7a..0000000 --- a/.github/workflows/workflows/actions.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: install-and-test-workflow -on: [push] -jobs: - install-and-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.9 - uses: actions/setup-python@v5 - with: - python-version: 3.9 - - 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 - - name: Test with pytest - run: | - python -m coverage run -m pytest -sv - - 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@v4 - - name: Set up Python 3.9 - uses: actions/setup-python@v5 - 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-linting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: chartboost/ruff-action@v1 - with: - args: "check ." - # to enable auto-formatting check, uncomment the following lines below - # ruff-formatting: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - uses: chartboost/ruff-action@v1 - # with: - # args: "format . --check"