Skip to content

Added initial support for Product.CMFPlacefulWorkflow #75

Added initial support for Product.CMFPlacefulWorkflow

Added initial support for Product.CMFPlacefulWorkflow #75

Workflow file for this run

name: Backend CI
on:
push:
paths:
- "backend/**"
- ".github/workflows/backend.yml"
workflow_dispatch:
jobs:
black:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Run check
uses: plone/code-analysis-action@v2
with:
base_dir: 'backend'
check: 'black'
flake8:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Run check
uses: plone/code-analysis-action@v2
with:
base_dir: 'backend'
check: 'flake8'
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Run check
uses: plone/code-analysis-action@v2
with:
base_dir: 'backend'
check: 'isort'
zpretty:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Run check
uses: plone/code-analysis-action@v2
with:
base_dir: 'backend'
check: 'zpretty'
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- 3.11
plone:
- "6.0.4"
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v3
- name: Setup Plone ${{ matrix.plone }} with Python ${{ matrix.python }}
uses: plone/setup-plone@v2.0.0
with:
python-version: ${{ matrix.python }}
plone-version: ${{ matrix.plone }}
- name: Install package
run: |
pip install mxdev
mxdev -c mx.ini
pip install -r requirements-mxdev.txt
- name: Run tests
run: |
PYTHONWARNINGS=ignore zope-testrunner --auto-color --auto-progress --test-path src/slc_web/src/
release:
runs-on: ubuntu-latest
needs: [black, flake8, isort, zpretty, tests]
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ScrumLATAMComunidad/slc-web-backend
labels: |
org.label-schema.docker.cmd=docker run -d -p 8080:8080 ScrumLATAMComunidad/slc-web-backend:latest
flavor:
latest=false
tags: |
type=ref,event=branch
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Container Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64
context: backend
file: backend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}