Skip to content

[pre-commit.ci] pre-commit autoupdate #586

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #586

Workflow file for this run

name: CI
on:
push:
branches: "*"
pull_request:
branches: "*"
jobs:
test:
name: ${{ matrix.python-version }}-build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
timeout-minutes: 20
steps:
- uses: actions/[email protected]
- uses: conda-incubator/[email protected]
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
activate-environment: carbonplan
channels: conda-forge
channel-priority: true
environment-file: envs/python-notebook/environment.yml
- shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- shell: bash -l {0}
run: |
python -m pip install --no-deps -e .
python -m pip list
- name: Running Tests
shell: bash -l {0}
run: |
python -m pytest --verbose
docker:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- python-notebook
- R-notebook
steps:
- name: Checkout
uses: actions/[email protected]
- name: Docker meta
id: docker_meta
uses: crazy-max/[email protected]
with:
images: |
carbonplan/forests-${{matrix.image}}
tag-sha: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: envs/${{matrix.image}}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}