Skip to content

Commit

Permalink
Update test in CI with gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pradal committed May 12, 2022
1 parent 93be531 commit e29a101
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 6 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/conda-package-build.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
9 changes: 3 additions & 6 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}

0 comments on commit e29a101

Please sign in to comment.