Skip to content

Correct input in python-package-conda.yml #60

Correct input in python-package-conda.yml

Correct input in python-package-conda.yml #60

name: Python Package using Conda
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
#TODO:jobs:
# build:
# runs-on: ${{matrix.os}}
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest]#, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9.13
uses: actions/setup-python@v3
with:
python-version: 3.9.13
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file env.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python gnnom/mysaxsdocument/setup.py install
conda install pytest
pytest
- name: Test run
run: |
python setup.py sdist
tar -xvf dist/gnnom-1.0.tar.gz
cd gnnom-1.0
python gnnom/apply_nn.py p mw testdata/SASDCF8.dat 44.66 2.74 --n 1000 --mode DEBUG --units nanometer
python gnnom/apply_nn.py p dmax testdata/SASDCF8.dat 44.66 2.74 --n 1000 --mode DEBUG --units nanometer
python gnnom/apply_nn.py p mw testdata/SASDCK2.dat 0.037 32.87 --n 1001 --mode DEBUG --units angstrom
python gnnom/apply_nn.py p dmax testdata/SASDCK2.dat 0.037 32.87 --n 1001 --mode DEBUG --units angstrom
python gnnom/apply_nn.py p mw testdata/SASDAB2.dat 1206.41 1.3 --n 1002 --mode DEBUG --units nanometer
python gnnom/apply_nn.py p dmax testdata/SASDAB2.dat 1206.41 1.3 --n 1002 --mode DEBUG --units nanometer
python gnnom/apply_nn.py p mw testdata/SASDA92.dat 221.0 4.1 --n 1003 --mode DEBUG --units nanometer
python gnnom/apply_nn.py p dmax testdata/SASDA92.dat 221.0 4.1 --n 1003 --mode DEBUG --units nanometer
find . -name *.svg
pwd
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: svg-histo-artifact
path:
gnnom-1.0/testdata/p-*.svg
retention-days: 5
# - name: 'Build and push to Docker hub'
# uses: mr-smithers-excellent/docker-build-push@v5
# with:
# image: dmolodenskiy/gnnom
# registry: docker.io
# dockerfile: docker/Dockerfile
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}