Skip to content

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

[pre-commit.ci] pre-commit autoupdate

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

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]
steps:
- uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/[email protected]
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: |
python -m pip install -r dev-requirements.txt
python -m pip install --no-deps -e .
python -m pip list
- name: Running Tests
run: |
python -m pytest --verbose
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set the repo hash
id: reop_hash
run: |
echo $(git rev-parse --short ${GITHUB_SHA})
echo "REPO_HASH=$(git rev-parse --short ${GITHUB_SHA})" >> $GITHUB_ENV
- name: Docker meta
id: docker_meta
uses: docker/[email protected]
with:
images: |
carbonplan/trace-python-notebook
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=sha
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/[email protected]
with:
context: envs/python-notebook
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=registry,ref=carbonplan/trace-python-notebook:latest
build-args: |
REPO_HASH=${{ env.REPO_HASH }}