Robot Framework Support (#1173) #93
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: Block Quality Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
block-completeness: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout repository | |
- uses: actions/setup-python@v4 | |
name: Setup Python 3.11 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Setup Poetry 1.6 | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: "1.6" | |
- uses: actions/cache@v3 | |
name: Setup Poetry caching | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- name: Install Python dependencies | |
run: poetry install --with dev | |
- name: Check if there is any missing Block component | |
run: poetry run python3 fjblock.py sync | |
- name: Check if everything is in sync | |
run: | | |
if git add . && git diff --quiet && git diff --cached --quiet; then | |
echo "No changes found, we are good to go!" | |
else | |
echo "Error: Changes detected. Please make sure to run the sync command and commit the changes" | |
git status --porcelain | |
exit 1 | |
fi | |
block-code-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout repository | |
- uses: chartboost/ruff-action@v1 | |
name: Ruff format check | |
with: | |
args: format --check . | |
block-code-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout repository | |
- uses: chartboost/ruff-action@v1 | |
name: Ruff linter check | |
pytest: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout repository | |
- uses: actions/setup-python@v4 | |
name: Setup Python 3.11 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Setup Poetry 1.6 | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: "1.6" | |
- name: Install dependencies for pytest | |
run: poetry install --with dev | |
- name: Run pytest | |
run: poetry run python -m pytest -vv -m "not slow" . |