Skip to content

Merge pull request #11 from musicinmybrain/typo #53

Merge pull request #11 from musicinmybrain/typo

Merge pull request #11 from musicinmybrain/typo #53

Workflow file for this run

name: Python install and test
on:
push:
branches: [ "main", "development" ]
pull_request:
branches: [ "main", "development" ]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.9", "3.10", "3.11"]
runs-on: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
pip install .
- name: Set up config non windows
env:
NSGR_USERNAME: ${{ secrets.NSGR_USERNAME }}
NSGR_PASSWORD: ${{ secrets.NSGR_PASSWORD }}
NSGR_APPID: ${{ secrets.NSGR_APPID }}
if: ${{ matrix.runs-on != 'windows-latest' }}
run: |
echo "APPNAME=PY_EXPANSE" > nsgrest.conf
echo "URL=https://nsgr.sdsc.edu:8443/cipresrest/v1" >> nsgrest.conf
echo "USERNAME=${NSGR_USERNAME}" >> nsgrest.conf
echo "PASSWORD=${NSGR_PASSWORD}" >> nsgrest.conf
echo "APPID=${NSGR_APPID}" >> nsgrest.conf
more nsgrest.conf # print contents so far...
- name: Set up config windows
env:
NSGR_USERNAME: ${{ secrets.NSGR_USERNAME }}
NSGR_PASSWORD: ${{ secrets.NSGR_PASSWORD }}
NSGR_APPID: ${{ secrets.NSGR_APPID }}
if: ${{ matrix.runs-on == 'windows-latest' }}
run: |
echo "APPNAME=PY_EXPANSE" > nsgrest.conf
echo "URL=https://nsgr.sdsc.edu:8443/cipresrest/v1" >> nsgrest.conf
$outtext_username = "USERNAME=$($env:NSGR_USERNAME)"
$outtext_username | Out-File -FilePath "nsgrest.conf" -Append
$outtext_password = "PASSWORD=$($env:NSGR_PASSWORD)"
$outtext_password | Out-File -FilePath "nsgrest.conf" -Append
$outtext_appid = "APPID=$($env:NSGR_APPID)"
$outtext_appid | Out-File -FilePath "nsgrest.conf" -Append
more nsgrest.conf # print contents so far...
- name: Version info
run: |
pip list
- name: Test listing
run: |
nsgr_job -c nsgrest.conf -l
- name: Test submission non windows
if: ${{ matrix.runs-on != 'windows-latest' }}
run: |
cd example && nsgr_submit -c ../nsgrest.conf . validate && nsgr_submit -c ../nsgrest.conf . run && cd NGBW* && tar -xvf output.tar.gz && echo "" && echo "" && echo "Output file contents:" && echo "" && cd example_dir && cat output.txt
- name: Test submission windows
if: ${{ matrix.runs-on == 'windows-latest' }}
run: |
cd example && nsgr_submit -c ..\nsgrest.conf . validate && nsgr_submit -c ..\nsgrest.conf . run && cd NGBW* && tar -xvf output.tar.gz && echo "" && echo "" && echo "Output file contents:" && echo "" && cd example_dir && cat output.txt