Try testing #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Linter | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- uses: Gr1N/setup-poetry@v8 | |
- name: Install dependencies | |
run: poetry install | |
- name: Run linter | |
run: poetry run ruff --format github . | |
code-format: | |
name: Code formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- uses: Gr1N/setup-poetry@v8 | |
- name: Install dependencies | |
run: poetry install | |
- name: Check code formatting | |
run: poetry run yapf --diff --recursive src/ tests/ | |
test: | |
name: Sanity checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- uses: Gr1N/setup-poetry@v8 | |
with: | |
poetry-version: '1.7.1' | |
- name: Install dependencies | |
run: poetry install | |
- name: Export PYTHONPATH | |
run: | | |
echo "PYTHONPATH=$GITHUB_WORKSPACE:\$PYTHONPATH" >> $GITHUB_ENV | |
- name: Run all sanity checks | |
run: poetry run pytest tests/ | |