Skip to content

[pre-commit.ci] auto fixes from pre-commit.com hooks #240

[pre-commit.ci] auto fixes from pre-commit.com hooks

[pre-commit.ci] auto fixes from pre-commit.com hooks #240

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@v3
- 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@v3
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v3.6.2
with:
images: |
carbonplan/retro-${{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
- name: Login to DockerHub
uses: docker/login-action@v1.14.1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2.10.0
with:
context: envs/${{matrix.image}}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}