Skip to content

Commit

Permalink
Merge branch 'develop' into add-human-friendly-css-classes
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 authored Feb 18, 2024
2 parents f34dc4d + d75c4ff commit d62ba2f
Show file tree
Hide file tree
Showing 71 changed files with 3,539 additions and 2,921 deletions.
75 changes: 62 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,80 @@ jobs:
max-parallel: 4
matrix:
python-version: ['3.10']
node-version: ['18']

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- uses: actions/checkout@v3
- uses: awalsh128/[email protected]
with:
packages: libsasl2-dev python3-dev libldap2-dev libssl-dev
version: 1.0

# Setup python & dependencies
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.10'
# Build Vue frontend
- uses: actions/setup-node@v4
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Cache StaticFiles
uses: actions/cache@v3
id: django_cache
with:
path: |
./cookbook/static
./vue/webpack-stats.json
./staticfiles
key: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }}
# Build Vue frontend & Dependencies
- name: Set up Node ${{ matrix.node-version }}
if: steps.django_cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: ./vue/yarn.lock

- name: Install Vue dependencies
if: steps.django_cache.outputs.cache-hit != 'true'
working-directory: ./vue
run: yarn install

- name: Build Vue dependencies
if: steps.django_cache.outputs.cache-hit != 'true'
working-directory: ./vue
run: yarn build
- name: Install Django dependencies

- name: Compile Django StatisFiles
if: steps.django_cache.outputs.cache-hit != 'true'
run: |
sudo apt-get -y update
sudo apt-get install -y libsasl2-dev python3-dev libldap2-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
python3 manage.py collectstatic --noinput
python3 manage.py collectstatic_js_reverse
- uses: actions/cache/save@v3
if: steps.django_cache.outputs.cache-hit != 'true'
with:
path: |
./cookbook/static
./vue/webpack-stats.json
./staticfiles
key: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }}
- name: Django Testing project
run: |
pytest
run: pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
comment_mode: off
files: |
junit/test-results-${{ matrix.python-version }}.xml
1 change: 1 addition & 0 deletions .idea/dictionaries/vaben.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cookbook/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ def user(obj):


class MealTypeAdmin(admin.ModelAdmin):
list_display = ('name', 'created_by', 'order')
search_fields = ('name', 'created_by__username')
list_display = ('name', 'space', 'created_by', 'order')
search_fields = ('name', 'space', 'created_by__username')


admin.site.register(MealType, MealTypeAdmin)
Expand Down
Loading

0 comments on commit d62ba2f

Please sign in to comment.