This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
96 lines (94 loc) · 3.22 KB
/
cate-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Unittest Cate
on:
push:
release:
types: [published]
jobs:
unittest:
env:
XCUBE_VERSION: 0.13.0.dev3
XCUBE_CCI_VERSION: 0.9.7
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: get-xcube
shell: bash
run: |
wget https://github.com/dcs4cop/xcube/archive/v"${XCUBE_VERSION}".tar.gz
tar xvzf v"${XCUBE_VERSION}".tar.gz
mv xcube-"${XCUBE_VERSION}" xcube
ls -al
rm v"${XCUBE_VERSION}".tar.gz
- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge
activate-environment: xcube
environment-file: xcube/environment.yml
- name: setup-xcube
shell: bash -l {0}
run: |
cd xcube
python setup.py install
cd ..
- name: setup-xcube-cci
shell: bash -l {0}
run: |
wget https://github.com/dcs4cop/xcube-cci/archive/v"${XCUBE_CCI_VERSION}".tar.gz
tar xvzf v"${XCUBE_CCI_VERSION}".tar.gz
cd xcube-cci-"${XCUBE_CCI_VERSION}"
python setup.py install
mamba install -y -c conda-forge aiohttp nest-asyncio lxml pydap cartopy jsonschema
- name: setup-cate
shell: bash -l {0}
run: |
conda info
conda list
python setup.py develop
- name: unittest-cate
shell: bash -l {0}
run: |
# For the unit-tests, disable Numba JIT, otherwise Coverage wont reach the actual Python code
export NUMBA_DISABLE_JIT=1
# Uncomment following line if web testing on travis breaks our build
export CATE_DISABLE_WEB_TESTS=1
# geopandas in tests break the build on appveyor (maybe the problem of gdal?)
export CATE_DISABLE_GEOPANDAS_TESTS=1
export CATE_DISABLE_PLOT_TESTS=1
export CATE_DISABLE_CLI_UPDATE_TESTS=1
py.test -v --cov=cate tests
build-docker-image:
runs-on: ubuntu-latest
name: build-docker-image
needs: unittest
env:
APP_NAME: cate
steps:
- name: git-checkout
uses: actions/checkout@v2
- name: get-release-tag
id: release
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: info
id: info
run: |
echo "TAG: ${{ steps.release.outputs.tag }}"
echo "EVENT: ${{ github.event_name }}"
- uses: mr-smithers-excellent/docker-build-push@v5
name: build-push-docker-image-latest
if: ${{ github.event_name == 'push' && steps.release.outputs.tag == 'master' }}
with:
image: ccitools/${{ env.APP_NAME }}
tags: master, latest
registry: quay.io
username: ${{ secrets.QUAY_DOCKER_REPO_USERNAME }}
password: ${{ secrets.QUAY_DOCKER_REPO_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v5
name: build-push-docker-image
if: ${{ github.event_name == 'release' }}
with:
image: ccitools/${{ env.APP_NAME }}
tags: ${{ steps.release.outputs.tag }}
registry: quay.io
username: ${{ secrets.QUAY_DOCKER_REPO_USERNAME }}
password: ${{ secrets.QUAY_DOCKER_REPO_PASSWORD }}