Skip to content

Update pypi.yml

Update pypi.yml #45

Workflow file for this run

name: Docker Image CI
on: [push, pull_request]
jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v3
-
name: Install Python 3.9 🐍
uses: actions/setup-python@v4
with:
python-version: '3.9'
-
name: Set up runner 📦
run: pip3 install black==23.1.0
-
name: "Black: Code Formatting 👮🏽‍♀️"
run: black --diff . && black -v --check .
base_image:
name: Base Image for standard environment
runs-on: ubuntu-latest
needs: linting
steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v3
-
name: Create tag name 🆔
run: echo "DOCKER_TAG=$(echo "${{ github.ref_name }}" | sed -E 's/[^[:alnum:].-]+/-/g' | sed -E 's/^[^[:alnum:]]+//')" >> $GITHUB_ENV
-
name: docker
run: docker build -t ${DOCKER_TAG} -f environments/Dockerfile .
-
name: Pytest
run: docker run ${DOCKER_TAG} pytest
base_image_gpu:
name: Base Image for GPU environment
runs-on: ubuntu-latest
needs: linting
steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v3
-
name: Create tag name 🆔
run: echo "DOCKER_TAG=$(echo "${{ github.ref_name }}-gpu" | sed -E 's/[^[:alnum:].-]+/-/g' | sed -E 's/^[^[:alnum:]]+//')" >> $GITHUB_ENV
-
name: docker
run: docker build -t ${DOCKER_TAG} -f environments/Dockerfile.gpu .
-
name: Pytest
run: docker run ${DOCKER_TAG} pytest