Skip to content

small style changes

small style changes #7

name: Backend code analysis on branches
on:
workflow_dispatch:
push:
branches-ignore:
- main
paths:
- "backend/**"
jobs:
meta:
if: github.ref_type == 'branch'
runs-on: ubuntu-latest
outputs:
PLONE_VERSION: ${{ steps.vars.outputs.PLONE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Env Vars
id: vars
run: |
echo "PLONE_VERSION=$(cat backend/version.txt)" >> $GITHUB_OUTPUT
black:
if: github.ref_type == 'branch'
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:
if: github.ref_type == 'branch'
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:
if: github.ref_type == 'branch'
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:
if: github.ref_type == 'branch'
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:
if: github.ref_type == 'branch'
runs-on: ubuntu-latest
needs:
- meta
steps:
- uses: actions/checkout@v3
- name: Run tests
run: |
make install-backend
make test-backend