Skip to content
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

Updating CI/CD and full migration to Github #335

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bac71c7
Deleted all gitlab CI work.
MicahGale Jan 21, 2024
6a14b71
Removed pytest.ini
MicahGale Jan 21, 2024
4846286
Moved all requirements to pypyroject.toml
MicahGale Jan 21, 2024
4c33d4a
Updated actions to not use requirements anymore.
MicahGale Jan 21, 2024
bf175fd
Fixed bad maintainers.
MicahGale Jan 21, 2024
0eef2c1
Relaxed black requirement.
MicahGale Jan 21, 2024
d166e43
Had pip defer to local for installing.
MicahGale Jan 21, 2024
373cfac
Correct setuptools-scm dependency
MicahGale Jan 21, 2024
88ad4f8
Ignoring version file from setuptools_scm
MicahGale Jan 21, 2024
9fb3b12
Implemented Coveralls with a lot of trial and error.
MicahGale Jan 21, 2024
4f1c6b6
Deleted all gitlab CI work.
MicahGale Jan 21, 2024
5bd8051
Removed pytest.ini
MicahGale Jan 21, 2024
5549e76
Moved all requirements to pypyroject.toml
MicahGale Jan 21, 2024
9b3e70e
Updated actions to not use requirements anymore.
MicahGale Jan 21, 2024
a80b73d
Fixed bad maintainers.
MicahGale Jan 21, 2024
987350b
Relaxed black requirement.
MicahGale Jan 21, 2024
0bba820
Had pip defer to local for installing.
MicahGale Jan 21, 2024
c836d61
Correct setuptools-scm dependency
MicahGale Jan 21, 2024
044ae17
Ignoring version file from setuptools_scm
MicahGale Jan 21, 2024
cea9453
Implemented Coveralls with a lot of trial and error.
MicahGale Jan 21, 2024
fbcc3a7
Ignore _version from coverage.
MicahGale Jan 21, 2024
b0cf2df
Limited coveralls to coverage.xml only.P
MicahGale Jan 21, 2024
196ef9b
Added basic badges
MicahGale Jan 21, 2024
53af432
First try with using test reporter.
MicahGale Jan 21, 2024
907c082
Added name to test reporter.
MicahGale Jan 21, 2024
e23c441
Added reporter to test reporter.
MicahGale Jan 21, 2024
2ec0bcd
Made test names more meaningful.
MicahGale Jan 21, 2024
b6a28b0
Merge branch 'develop' into all-in-cd
MicahGale Jan 21, 2024
0c7e85c
Actually implemented a build and deploy phase
MicahGale Jan 21, 2024
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
39 changes: 25 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8
- run: pip install --user -r requirements/dev.txt
- run: pip install . montepy[develop]
- run: python -m pytest

build-pages:
Expand All @@ -30,13 +30,29 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.8
- run: pip install --user montepy[doc]
- run: pip install --user . montepy[doc]
- run: cd doc && make html
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
name: deploy-pages
path: doc/build/html/

build-packages:
runs-on: ubuntu-latest
needs: [last-minute-test]
steps:
- uses: actions/checkout@v4
- name: set up python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- run: pip install . montepy[build]
- run: python -m build .
- uses: actions/upload-artifact@v4
with:
name: build
path: dist/*

deploy-pages:
permissions:
Expand Down Expand Up @@ -65,18 +81,16 @@ jobs:
environment:
name: test-pypi
url: https://test.pypi.org/p/montepy # Replace <package-name> with your PyPI project name
needs: [deploy-pages]
needs: [deploy-pages, build-packages]
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/download-artifact@v4
with:
python-version: 3.8
- run: python -m pip install build
- run: python -m build --sdist --wheel
name: build
- uses: actions/setup-python@v4
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand All @@ -86,18 +100,15 @@ jobs:
environment:
name: pypi
url: https://pypi.org/p/montepy # Replace <package-name> with your PyPI project name
needs: [deploy-pages, deploy-test-pypi]
needs: [deploy-pages, deploy-test-pypi, build-packages]
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/download-artifact@v4
with:
python-version: 3.8
- run: python -m pip install build
- run: python -m build --sdist --wheel
name: build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

Expand Down
36 changes: 27 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test package
name: CI testing

on: [push]

Expand All @@ -16,15 +16,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: pip install --upgrade pip build
- run: pip install -r requirements/common.txt
- run: pip install build
- run: python -m build --sdist --wheel
- run: pip install .
- run: pip uninstall -y montepy
- run: pip install --user dist/*.whl
- run: pip uninstall -y montepy
- run: pip install --user dist/*.tar.gz
- run: pip install --user montepy[test]
- run: pip install --user montepy[doc]
- run: pip install --user . montepy[test]
- run: pip install --user . montepy[doc]
- run: pip install --user . montepy[format]
- run: pip install --user . montepy[build]
- run: pip install --user . montepy[develop]
- run: pip freeze
- name: Upload build artifacts
uses: actions/upload-artifact@v3
Expand All @@ -44,20 +47,35 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install --user -r requirements/dev.txt
- run: pip install --user . montepy[test]
- run: coverage run -m pytest --junitxml=test_report.xml
- run: coverage report
- run: coverage xml
- name: Upload test report
uses: actions/upload-artifact@v3
if: ${{ matrix.python-version == '3.9' }}
uses: actions/upload-artifact@v4
with:
name: test
path: test_report.xml
- name: Upload coverage report
uses: actions/upload-artifact@v3
if: ${{ matrix.python-version == '3.9' }}
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.xml
- name: Test Reporter
if: ${{ matrix.python-version == '3.9' }}
uses: dorny/[email protected]
with:
name: CI-test-report
path: test_report.xml
reporter: java-junit
- name: Coveralls GitHub Action
if: ${{ matrix.python-version == '3.9' }}
uses: coverallsapp/[email protected]
with:
file: coverage.xml


doc-test:
runs-on: ubuntu-latest
Expand All @@ -68,7 +86,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8
- run: pip install montepy[doc]
- run: pip install . montepy[doc]
- run: sphinx-build doc/source/ doc/build/ -W --keep-going -E
- run: sphinx-build -b html doc/source/ doc/build/html
- uses: actions/upload-artifact@v3
Expand All @@ -85,7 +103,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8
- run: pip install --user -r requirements/dev.txt
- run: pip install . montepy[format]
- run: black --check montepy/ tests/


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ doc/build/*
.coverage
.idea/
.ipynb_checkpoints/
montepy/_version.py
167 changes: 0 additions & 167 deletions .gitlab-ci.yml

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

<img src="https://raw.githubusercontent.com/idaholab/MontePy/develop/graphics/monty.svg" width="180" alt="MontePY: a cute snek on a red over white circle"/>

[![license](https://img.shields.io/github/license/idaholab/MontePy.svg)](https://github.com/idaholab/MontePy/blob/develop/LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/idaholab/MontePy/badge.svg?branch=develop)](https://coveralls.io/github/idaholab/MontePy?branch=develop)
[![PyPI version](https://badge.fury.io/py/montepy.svg)](https://badge.fury.io/py/montepy)

A python library to read, edit, and write MCNP input files.

## Installing
Expand Down
Loading