compose-viz/.github/workflows/ci.yml

43 lines
1,007 B
YAML

name: CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Switch to Current Branch
run: git checkout ${{ env.BRANCH }}
- run: |
sudo apt-get update
sudo apt-get install -y graphviz
- name: Setup Python 3.10.4
uses: actions/setup-python@v3
with:
python-version: '3.10.4'
- name: Setup Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.2
- name: Install Dependencies
run: |
poetry install --no-root
- name: Execute pre-commit
run: |
poetry run python -m pre_commit run --all-files --show-diff-on-failure
- name: Run Pytest
run: |
poetry run python -m pytest --cov=compose_viz tests/ --tb=short