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

44 lines
1,002 B
YAML
Raw Normal View History

2022-05-03 16:05:00 +02:00
name: CI
on:
push:
2022-05-07 18:42:14 +02:00
branches: [ main, dev ]
2022-05-03 16:05:00 +02:00
pull_request:
2022-05-07 18:42:14 +02:00
branches: [ main, dev ]
2022-05-03 16:05:00 +02:00
jobs:
2022-05-03 16:10:41 +02:00
test:
2022-05-03 16:05:00 +02:00
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
2022-05-18 17:28:18 +02:00
2022-05-03 16:05:00 +02:00
- name: Switch to Current Branch
run: git checkout ${{ env.BRANCH }}
2022-05-16 20:36:41 +02:00
- run: |
sudo apt-get update
sudo apt-get install -y graphviz
2022-05-18 17:28:18 +02:00
2022-05-03 16:05:00 +02:00
- name: Setup Python 3.10.4
uses: actions/setup-python@v3
with:
python-version: '3.10.4'
2022-05-18 17:28:18 +02:00
2022-05-08 10:11:49 +02:00
- name: Setup Poetry
uses: Gr1N/setup-poetry@v7
with:
poetry-version: 1.1.7
- name: Install Dependencies
run: |
poetry install --no-root
2022-05-08 10:11:49 +02:00
2022-05-18 17:33:56 +02:00
- name: Execute pre-commit
2022-05-03 16:05:00 +02:00
run: |
2022-05-18 17:33:56 +02:00
poetry run python -m pre_commit run --all-files --show-diff-on-failure
- name: Run Pytest
run: |
2022-05-19 09:29:37 +02:00
poetry run python -m pytest --cov=compose_viz tests/ --tb=short