Bump markdown2 from 2.5.2 to 2.5.3 #1974
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
- name: Lint with ruff | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
ruff check . --select=E9,F63,F7,F82 --statistics --exclude=.venv/,./src/whathappened/migrations/ | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
ruff check . --exit-zero --statistics --exclude=.venv/,./src/whathappened/migrations/ | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
- name: Test with pytest and make coverage report | |
run: | | |
pytest -vvv --cov=whathappened | |
coverage report | |
coverage html | |
continue-on-error: ${{ contains(matrix.python-version, 'beta')}} | |
- name: Archive coverage html report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report | |
path: htmlcov | |
check-migration: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
- name: Check if database needs migration. | |
run: | | |
FLASK_APP=./src/whathappened.web flask db upgrade | |
FLASK_APP=./src/whathappened.web flask db check | |
continue-on-error: ${{ contains(matrix.python-version, 'beta')}} | |
test-frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Test frontend | |
run: | | |
cd frontend; npm install; npm run test | |
build: | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
os: [ubuntu-24.04, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade setuptools | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
cd frontend; npm install; cd .. | |
- name: Build assets | |
run: | | |
FLASK_APP=src/whathappened.web flask assets build | |
FLASK_APP=src/whathappened.web flask main build | |
continue-on-error: ${{ contains(matrix.python-version, 'beta')}} | |
- name: Test with pytest and make coverage report | |
run: | | |
pytest -vvv | |
continue-on-error: ${{ contains(matrix.python-version, 'beta')}} | |
- name: Setup database | |
run: | | |
make setup | |
- name: Run package creation | |
run: | | |
make dist | |
- name: Archive package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: whathappened-${{ matrix.os }}-${{ matrix.python-version }} | |
path: dist |