Skip to content

fix: Change to force CICD #65

fix: Change to force CICD

fix: Change to force CICD #65

Workflow file for this run

on:
push:
branches:
- master
name: release-please
jobs:
continuous-integration:
name: Continuous integration ${{ matrix.os }} python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"] #"macos-latest",
python-version: ["3.7","3.8","3.9"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python }}
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
- name: Installing dependencies
shell: bash -l {0}
run: |
conda install -c loop3d numpy pandas geopandas pyproj shapely rasterio"<=1.2.10" descartes matplotlib-base networkx scipy owslib tqdm map2model mplstereonet hjson loopprojectfile beartype cftime">=1.4.0" -y
- name: Checking formatting of code
shell: bash -l {0}
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 map2loop --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 map2loop --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Building and install
shell: bash -l {0}
run: |
pip install .
# - name: pytest
# shell: bash -l {0}
# run: |
# pytest
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
release-type: python
package-name: map2loop
include-v-in-tag: false
outputs:
release_created: ${{ steps.release.outputs.release_created }}
conda-deploy:
name: Uploading to Loop3d for python ${{ matrix.os }})
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"] # ,"macos-latest"]
python-version: ["3.9","3.8","3.7"]
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
- uses: actions/checkout@v2
- name: update submodules
# shell: bash -l {0}
run: |
git submodule update --init --recursive
- name: Add msbuild to PATH
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.0.2
- name: Conda build'
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
shell: bash -l {0}
run: |
conda install conda-build
conda install -c loop3d numpy pandas geopandas pyproj shapely rasterio"<=1.2.10" descartes matplotlib-base networkx scipy owslib tqdm map2model mplstereonet hjson loopprojectfile beartype cftime">=1.4.0" -y
conda build -c loop3d --python ${{ matrix.python-version }} --output-folder conda conda
conda install anaconda-client -y
- name: upload windows
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
if: matrix.os == 'windows-latest'
shell: bash -l {0}
run: |
anaconda upload --label main conda/win-64/*.tar.bz2
- name: upload linux
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: |
anaconda upload --label main conda/linux-64/*.tar.bz2
- name: upload macosx
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
if: matrix.os == 'macos-latest'
shell: bash -l {0}
run: |
anaconda upload --label main conda/osx-64/*.tar.bz2