Make a new release with documentation build flow #177
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: | |
- develop | |
- master | |
- main | |
jobs: | |
test-full: | |
name: Full Test Suite | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Conda with Python ${{ matrix.python-version }} | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
auto-activate-base: false | |
- name: Check Conda and install libnfft3 | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
sudo apt install -y libnfft3-dev | |
python --version | |
- name: Install Dependencies | |
shell: bash -l {0} | |
run: | | |
python --version | |
which python | |
python -m pip install --upgrade pip | |
python -m pip install git+https://github.com/CEA-COSMIC/ModOpt.git@develop | |
python -m pip install git+https://github.com/CEA-COSMIC/pysap.git@develop | |
python -m pip install git+https://github.com/AGrigis/pysphinxdoc.git | |
python -m pip install coverage nose pytest pytest-cov pycodestyle twine pytest-xdist | |
python -m pip install pynfft2 | |
python -m pip install --upgrade . | |
- name: Check PEP | |
shell: bash -l {0} | |
continue-on-error: true | |
run: | | |
pycodestyle mri --ignore="E121,E123,E126,E226,E24,E704,E402,E731,E722,E741,W503,W504,W605" | |
pycodestyle examples --ignore="E121,E123,E126,E226,E24,E704,E402,E731,E722,E741,W503,W504,W605" | |
- name: Run Tests | |
shell: bash -l {0} | |
run: | | |
which python | |
python setup.py test | |
- name: Save Test Results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: unit-test-results-${{ matrix.os }}-${{ matrix.python-version }} | |
path: pytest.xml | |
- name: Check Distribution | |
shell: bash -l {0} | |
run: | | |
python setup.py sdist | |
twine check dist/* | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml | |
flags: unittests | |