New release (1.1.11) #18
Workflow file for this run
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: Run tests with miniconda | |
on: [push] | |
jobs: | |
test: | |
name: Miniconda ${{ matrix.os }} Py${{ matrix.pyver }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
#os: ["ubuntu-latest", "windows-latest","macos-latest"] | |
os: ["windows-latest","macos-latest"] | |
pyver: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: test | |
# environment-file: environment.yml | |
python-version: ${{ matrix.pyver }} | |
auto-activate-base: false | |
- shell: bash -l {0} | |
run: | | |
conda config --add channels conda-forge | |
- name: Setup environment | |
shell: bash -l {0} | |
run: | | |
git clone --depth 1 -b develop https://github.com/NOAA-ORR-ERD/adios_oil_database.git oil_database | |
conda install -y mamba | |
cd ./py_gnome | |
echo "Setting up conda environment" | |
mamba install -y python=${{ matrix.pyver }} \ | |
--file conda_requirements.txt \ | |
--file conda_requirements_build.txt \ | |
--file conda_requirements_test.txt \ | |
--file ../oil_database/adios_db/conda_requirements.txt | |
- name: Build Our Packages | |
shell: bash -l {0} | |
run: | | |
pwd | |
ls -la | |
pip install ./oil_database/adios_db/ | |
cd ./py_gnome | |
python -m pip install ./ | |
- name: Run pytest | |
shell: bash -l {0} | |
run: | | |
cd ./py_gnome/tests/unit_tests | |
pytest --runslow | |
- name: Build wheel file | |
shell: bash -l {0} | |
run: | | |
cd ./py_gnome | |
python -m pip wheel ./ | |
- name: Copy files to artifact folder | |
shell: bash -l {0} | |
run: | | |
mkdir installable_wheel_${{ matrix.os }}_Py${{ matrix.pyver }} | |
cp ./py_gnome/*.whl installable_wheel_${{ matrix.os }}_Py${{ matrix.pyver }} | |
cp ./py_gnome/conda_requirements.txt installable_wheel_${{ matrix.os }}_Py${{ matrix.pyver }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: installable-wheel-${{ matrix.os }}-Py${{ matrix.pyver }} | |
path: installable_wheel_${{ matrix.os }}_Py${{ matrix.pyver }} | |
lint: | |
name: Flake8 linting | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: lint | |
python-version: 3.9 | |
auto-activate-base: false | |
- shell: bash -l {0} | |
run: | | |
conda config --add channels conda-forge | |
- name: Lint | |
shell: bash -l {0} | |
run: | | |
conda install flake8 | |
python -m flake8 --exit-zero --statistics py_gnome/gnome/ |