From e29a101dbdbdcd2153e89b808533d3c3740eb989 Mon Sep 17 00:00:00 2001 From: pradal Date: Thu, 12 May 2022 18:26:48 +0200 Subject: [PATCH] Update test in CI with gh actions --- .github/workflows/conda-package-build.yml | 67 +++++++++++++++++++++++ conda/meta.yaml | 9 +-- 2 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/conda-package-build.yml diff --git a/.github/workflows/conda-package-build.yml b/.github/workflows/conda-package-build.yml new file mode 100644 index 0000000..1d94539 --- /dev/null +++ b/.github/workflows/conda-package-build.yml @@ -0,0 +1,67 @@ +name: build_publish_anaconda + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-and-publish: + name: ${{ matrix.os }}, Python 3.${{ matrix.python-minor-version }} for conda deployment + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + max-parallel: 3 + matrix: + os: [ ubuntu-latest] + python-minor-version: [9] + isMaster: + - ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/dev') }} + exclude: + - isMaster: false + os: ubuntu-latest + python-minor-version: 7 + - isMaster: false + os: ubuntu-latest + python-minor-version: 8 + - isMaster: false + os: macos-latest + python-minor-version: 7 + - isMaster: false + os: macos-latest + python-minor-version: 8 + - isMaster: false + os: macos-latest + python-minor-version: 9 + - isMaster: false + os: windows-latest + python-minor-version: 7 + - isMaster: false + os: windows-latest + python-minor-version: 8 + - isMaster: false + os: windows-latest + python-minor-version: 9 + + steps: + - name: Chekout + uses: actions/checkout@v3 + - name: Determine publish + uses: haya14busa/action-cond@v1 + id: publish + with: + cond: ${{ contains(github.ref, 'master') || startsWith(github.ref, 'refs/heads/v') }} + if_true: 'true' + if_false: 'false' + - name: Build and Publish + uses: openalea/action-build-publish-anaconda@v0.1.3 + with: + conda: conda + mamba: true + python: ${{ matrix.python-minor-version }} + numpy: '20.0' + channels: openalea3, conda-forge + token: ${{ secrets.ANACONDA_TOKEN }} + publish: ${{ steps.publish.outputs.value }} + label: main \ No newline at end of file diff --git a/conda/meta.yaml b/conda/meta.yaml index 1b7a80a..49ba5b1 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -29,20 +29,17 @@ requirements: test: requires: - pytest - - path - - openalea.lpy imports: - - openalea.mtg + - alinea.adel source_files: - - share/data/** - test/** - test/data/** commands: - cd test - - pytest -v --ignore=test_aml.py --ignore=test_stat.py + - pytest -v --ignore=test_povray.py about: home: {{ data.get('url') }} - license: CeCILL-C + license: {{ data.get('license') }} summary: {{ data.get('description') }}