Skip to content

feat: mealdoo restaurant support #49

feat: mealdoo restaurant support

feat: mealdoo restaurant support #49

# Action name here
name: Code Maintenance
on:
# Triggered on main branch when lib/ or test/ contents change
push:
branches: [main]
paths:
- "organizer/"
- "test/"
# And every pull request to main
pull_request:
branches: [main]
# Allows manual triggering
workflow_dispatch:
jobs:
detect-secrets:
name: No committed secrets
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
set-safe-directory: true
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install detect-secrets
run: pip install detect-secrets
- name: Scan for secrets
run: detect-secrets scan --baseline .secrets.baseline
prettier-check:
name: Prettier formatted files
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
set-safe-directory: true
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install prettier
run: npm install -g prettier
- name: Run prettier against files
run: prettier -c .
analyze-code:
name: No code smells
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
set-safe-directory: true
- name: Setup environment
uses: ./.github/actions/setup-env
- name: Lint code
uses: chartboost/ruff-action@v1
- name: Check code formatting
uses: psf/black@stable
with:
options: "--check"
run-tests:
name: Tests pass
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
set-safe-directory: true
- name: Setup environment
uses: ./.github/actions/setup-env
- name: Make sure jmenu isn't installed
run: pip uninstall jmenu -y
- name: Run unit tests
run: pytest
- name: Build package
run: |
python3 -m build
pip install dist/*.whl
- name: Test import
shell: python
run: |
try:
import jmenu.main
print(jmenu.main.get_version())
exit(0)
except ModuleNotFoundError:
exit(1)
- name: Clean
run: pip uninstall jmenu -y