Skip to content

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

[pre-commit.ci] pre-commit autoupdate

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

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/checkout@v2.4.0
- uses: conda-incubator/setup-miniconda@v2.1.1
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/checkout@v2.4.0
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v3.6.1
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/setup-buildx-action@v1.6.0
- 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 }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/setup-python@v2.3.1
- uses: pre-commit/action@v2.0.3