Skip to content

Build validation

Build validation #329

Workflow file for this run

name: CI
on:
push:
branches: master
pull_request:
branches: master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install flatpak-builder
run: |
sudo apt-get update
sudo apt-get install -y flatpak-builder jq
- name: Setup Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
poetry install
- name: Check module sort order
run: poetry run isort --check-only flatpak_builder_lint
- name: Check code formatting
run: poetry run black --check flatpak_builder_lint
- name: Check code errors
run: poetry run flake8p flatpak_builder_lint
- name: Check python types
run: poetry run mypy flatpak_builder_lint
- name: Run test suite
run: poetry run pytest -v tests
- name: Validate exceptions.json
run: jq . < flatpak_builder_lint/staticfiles/exceptions.json