compose-viz/.github/workflows/ci.yml
Cheng Chih Yuan 36d18a6300
Fix #51
* fix: correcting regex for formatting string #51 
* ci: add cron.yml

---------

Co-authored-by: Xyphuz <38447974+wst24365888@users.noreply.github.com>
2024-04-28 01:34:03 +08:00

47 lines
1.1 KiB
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: Changing naming convention
run: |
python3 naming.py
- 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