updated branch info

This commit is contained in:
smilerz
2023-12-28 18:02:48 -06:00
parent 7e6f3ad92b
commit c597aed956
2 changed files with 76 additions and 76 deletions

View File

@@ -3,88 +3,88 @@ name: Continuous Integration
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build: build:
if: github.repository_owner == 'smilerz' if: github.repository_owner == 'TandoorRecipes'
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
max-parallel: 4 max-parallel: 4
matrix: matrix:
python-version: ['3.10'] python-version: ["3.10"]
node-version: ['18'] node-version: ["18"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@v1.4.1 - uses: awalsh128/cache-apt-pkgs-action@v1.4.1
with: with:
packages: libsasl2-dev python3-dev libldap2-dev libssl-dev packages: libsasl2-dev python3-dev libldap2-dev libssl-dev
version: 1.0 version: 1.0
# Setup python & dependencies # Setup python & dependencies
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
cache: 'pip' cache: "pip"
- name: Install Python Dependencies - name: Install Python Dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
- name: Cache StaticFiles - name: Cache StaticFiles
uses: actions/cache@v4 uses: actions/cache@v4
id: django_cache id: django_cache
with: with:
path: | path: |
./cookbook/static ./cookbook/static
./vue/webpack-stats.json ./vue/webpack-stats.json
./staticfiles ./staticfiles
key: | key: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }} ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }}
# Build Vue frontend & Dependencies # Build Vue frontend & Dependencies
- name: Set up Node ${{ matrix.node-version }} - name: Set up Node ${{ matrix.node-version }}
if: steps.django_cache.outputs.cache-hit != 'true' if: steps.django_cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'yarn' cache: "yarn"
cache-dependency-path: ./vue/yarn.lock cache-dependency-path: ./vue/yarn.lock
- name: Install Vue dependencies - name: Install Vue dependencies
if: steps.django_cache.outputs.cache-hit != 'true' if: steps.django_cache.outputs.cache-hit != 'true'
working-directory: ./vue working-directory: ./vue
run: yarn install run: yarn install
- name: Build Vue dependencies - name: Build Vue dependencies
if: steps.django_cache.outputs.cache-hit != 'true' if: steps.django_cache.outputs.cache-hit != 'true'
working-directory: ./vue working-directory: ./vue
run: yarn build run: yarn build
- name: Compile Django StatisFiles - name: Compile Django StatisFiles
if: steps.django_cache.outputs.cache-hit != 'true' if: steps.django_cache.outputs.cache-hit != 'true'
run: | run: |
python3 manage.py collectstatic --noinput python3 manage.py collectstatic --noinput
python3 manage.py collectstatic_js_reverse python3 manage.py collectstatic_js_reverse
- uses: actions/cache/save@v4 - uses: actions/cache/save@v4
if: steps.django_cache.outputs.cache-hit != 'true' if: steps.django_cache.outputs.cache-hit != 'true'
with: with:
path: | path: |
./cookbook/static ./cookbook/static
./vue/webpack-stats.json ./vue/webpack-stats.json
./staticfiles ./staticfiles
key: | key: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }} ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }}
- name: Django Testing project - name: Django Testing project
timeout-minutes: 6 timeout-minutes: 6
run: pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml run: pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Publish Test Results - name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2 uses: EnricoMi/publish-unit-test-result-action@v2
if: always() if: always()
with: with:
comment_mode: off comment_mode: off
files: | files: |
junit/test-results-${{ matrix.python-version }}.xml junit/test-results-${{ matrix.python-version }}.xml

View File

@@ -3,13 +3,13 @@ on:
# the 1st condition # the 1st condition
workflow_run: workflow_run:
workflows: ["Continuous Integration"] workflows: ["Continuous Integration"]
branches: [working] branches: [master]
types: types:
- completed - completed
jobs: jobs:
deploy: deploy:
if: github.repository_owner == 'smilerz' && ${{ github.event.workflow_run.conclusion == 'success' }} if: github.repository_owner == 'TandoorRecipes' && ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4