build(deps): update to latest flask
#534
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: | |
push: | |
jobs: | |
ci: | |
name: Run tests | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8, 3.9, "3.10"] | |
poetry-version: [1.8.2] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup poetry | |
uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Configure poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Set up cache | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Ensure cache is healthy | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | |
- name: Install dependencies | |
run: | | |
poetry run pip install --upgrade pip | |
poetry install --all-extras | |
- name: Run pytest | |
run: poetry run pytest -q tests -v | |
env: | |
CRYPTOCOMPARE_API_KEY: ${{secrets.CRYPTOCOMPARE_API_KEY}} | |
GPIOZERO_PIN_FACTORY: mock | |
publish: | |
name: Publish to pypi | |
needs: ci | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: 1.8.2 | |
- name: Configure Pypi token | |
shell: bash | |
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
- name: Publish Package | |
shell: bash | |
run: poetry publish --build | |
trigger_image_build: | |
name: Trigger tinyticker disk image build | |
needs: publish | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Workflow dispatch | |
run: gh workflow run "Build TinyTicker RPi image" --json --ref refs/heads/main --repo loiccoyle/private.actionsrunner | |
env: | |
GH_TOKEN: ${{ secrets.PRIVATE_RUNNER_ACCESS_TOKEN }} |