Skip to content

feat: add shutter child lock support #642

feat: add shutter child lock support

feat: add shutter child lock support #642

Workflow file for this run

---
name: Pull request build
on:
pull_request:
env:
MAIN_PY_VER: "3.10"
jobs:
lint:
runs-on: ubuntu-latest
name: Lint source files
permissions:
pull-requests: read
steps:
- name: Source checkout
uses: actions/checkout@v3
- name: Set up Python ${{ env.MAIN_PY_VER }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.MAIN_PY_VER }}
- name: Cache pip repository
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ env.MAIN_PY_VER }}
- name: Prepare python environment
run: |
pip install -r requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Cache poetry virtual environment
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ env.MAIN_PY_VER }}
- name: Install deno runtime
uses: denoland/setup-deno@v1.1.2
- name: Lint the project
run: |
make install-all-deps
make lint
test:
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
python: ["3.9", "3.10"]
name: Test project with Python ${{ matrix.python }}
permissions:
checks: write
pull-requests: write
steps:
- name: Source checkout
uses: actions/checkout@v3
- name: Setup timezone
uses: zcong1993/setup-timezone@v2.0.0
with:
timezone: Asia/Jerusalem
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Cache pip repository
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ matrix.python }}
- name: Prepare python environment
run: |
pip install -r requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Cache poetry virtual environment
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ matrix.python }}
- name: Install project build dependencies
run: make install-all-deps
- name: Test the project
run: >
if [ ${{ matrix.python }} == ${{ env.MAIN_PY_VER }} ];
then make test-with-coverage-reports;
else make test; fi
- name: Report test summary
uses: EnricoMi/publish-unit-test-result-action@v2
if: ${{ matrix.python == env.MAIN_PY_VER && always() }}
with:
test_changes_limit: 0
junit_files: ./junit.xml
report_individual_runs: true
- name: Push to CodeCov
uses: codecov/codecov-action@v3
if: ${{ matrix.python == env.MAIN_PY_VER }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
docs:
runs-on: ubuntu-latest
needs: [lint]
name: Verify documentation site
permissions:
pull-requests: read
steps:
- name: Source checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.MAIN_PY_VER }}
- name: Cache pip repository
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ env.MAIN_PY_VER }}
- name: Prepare python environment
run: |
pip install -r requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Cache poetry virtual environment
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ env.MAIN_PY_VER }}
- name: Build documentation site
run: |
make install-all-deps
make docs-build