Added test for server-side panel modules on S3 #2726
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: Unittest and docker builds | |
on: | |
push: | |
release: | |
types: [published] | |
env: | |
APP_NAME: xcube | |
ORG_NAME: bcdev | |
IMG_REG_NAME: quay.io | |
jobs: | |
unittest: | |
runs-on: ubuntu-latest | |
env: | |
NUMBA_DISABLE_JIT: 0 | |
steps: | |
- name: git-checkout | |
uses: actions/checkout@v4 | |
# Setup miniconda build env | |
- name: Set up Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: '1.4.8-0' | |
environment-file: environment.yml | |
init-shell: >- | |
bash | |
# Don't cache the environment, since this would prevent us from | |
# catching test failures caused by updated versions of dependencies. | |
cache-environment: false | |
post-cleanup: 'all' | |
# Setup xcube | |
- name: setup-xcube | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
pip install -e . | |
# Run unittests | |
- name: unittest-xcube | |
shell: bash -l {0} | |
run: | | |
pytest --cov=xcube --cov-report=xml | |
- uses: codecov/codecov-action@v4 | |
with: | |
verbose: true # optional (default = false) | |
build-docker-image: | |
runs-on: ubuntu-latest | |
# Build the docker image and push to quay.io | |
name: build-docker-image | |
# Only run if unittests succeed | |
needs: unittest | |
if: ${{ github.event_name == 'release' }} | |
steps: | |
- name: git-checkout | |
uses: actions/checkout@v4 | |
# Determine release tag from git ref | |
- name: get-release-tag | |
id: release | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
# Print some info | |
- name: info | |
id: info | |
run: | | |
echo "TAG: ${{ steps.release.outputs.tag }}" | |
echo "EVENT: ${{ github.event_name }}" | |
# Build and push docker release to quay.io when the event is a 'release' | |
- uses: mr-smithers-excellent/docker-build-push@v6 | |
name: build-push-docker-image-release | |
with: | |
image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }} | |
tags: ${{ steps.release.outputs.tag }} | |
registry: ${{ env.IMG_REG_NAME }} | |
username: ${{ secrets.IMG_REG_USERNAME }} | |
password: ${{ secrets.IMG_REG_PASSWORD }} | |