Skip to content

Commit

Permalink
Projeto gerado por cookieplone
Browse files Browse the repository at this point in the history
  • Loading branch information
samoel-silva committed Sep 27, 2024
1 parent c079802 commit 14c02e9
Show file tree
Hide file tree
Showing 254 changed files with 2,348 additions and 31,810 deletions.
4 changes: 1 addition & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ trim_trailing_whitespace = true
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{html,dtml,pt,zpt,xml,zcml,js,json,ts,less,css,sass,yml,yaml}]
[*.{html,dtml,pt,zpt,xml,zcml,js,json,ts,less,scss,css,sass,yml,yaml}]
# 2 space indentation
indent_size = 2

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
IMAGE_NAME_PREFIX: ghcr.io/collective/siteplone
IMAGE_NAME_PREFIX: ghcr.io/PROCERGS/siteplone
IMAGE_NAME_SUFFIX: backend
PYTHON_VERSION: "3.11"

Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Run tests
run: |
pytest --disable-warnings src/siteplone/tests
pytest --disable-warnings tests
release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: backend
Expand Down
69 changes: 46 additions & 23 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,72 @@ on:
workflow_dispatch:

env:
IMAGE_NAME_PREFIX: ghcr.io/collective/siteplone
IMAGE_NAME_PREFIX: ghcr.io/PROCERGS/siteplone
IMAGE_NAME_SUFFIX: frontend
NODE_VERSION: 18.x
NODE_VERSION: 20.x

defaults:
run:
working-directory: ./frontend

jobs:
meta:
runs-on: ubuntu-latest
outputs:
BASE_TAG: ${{ steps.vars.outputs.BASE_TAG }}
VOLTO_VERSION: ${{ steps.vars.outputs.VOLTO_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compute several vars needed for the build
id: vars
run: |
echo 'BASE_TAG=sha-$(git rev-parse --short HEAD)' >> $GITHUB_OUTPUT
python3 -c 'import json; data = json.load(open("./mrs.developer.json")); print("VOLTO_VERSION=" + data["core"].get("tag") or "latest")' >> $GITHUB_OUTPUT
- name: Test vars
run: |
echo 'BASE_TAG=${{ steps.vars.outputs.BASE_TAG }}'
echo 'VOLTO_VERSION=${{ steps.vars.outputs.VOLTO_VERSION }}'
code-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Update Global Yarn
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
cache-dependency-path: 'frontend/yarn.lock'

- name: Prettier
id: prettier
run: npx [email protected] --single-quote --check 'src/**/*.{js,jsx,ts,tsx,css,scss}' --config=package.json
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install packages
- name: Install dependencies
run: make install

- name: ESLint
id: eslint
- name: Linting
id: lint
if: ${{ success() || failure() }}
run: yarn run lint:ci
run: make lint

- name: i18n sync
id: i18n
if: ${{ success() || failure() }}
run: make i18n-ci
run: make ci-i18n

- name: Unit Tests
id: unit
Expand All @@ -64,15 +86,14 @@ jobs:
echo '# Code Analysis' >> $GITHUB_STEP_SUMMARY
echo '| Test | Status |' >> $GITHUB_STEP_SUMMARY
echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY
echo '| Prettier | ${{ steps.prettier.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY
echo '| ESLint | ${{ steps.eslint.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY
echo '| Lint | ${{ steps.lint.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY
echo '| i18n | ${{ steps.i18n.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY
echo '| Unit Tests | ${{ steps.unit.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY
release:
runs-on: ubuntu-latest
needs:
- meta
- code-analysis
permissions:
contents: read
Expand Down Expand Up @@ -112,11 +133,13 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: frontend/
file: frontend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: $${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VOLTO_VERSION=${{ needs.meta.outputs.VOLTO_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/varnish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
IMAGE_NAME_PREFIX: ghcr.io/collective/siteplone
IMAGE_NAME_PREFIX: ghcr.io/PROCERGS/siteplone
IMAGE_NAME_SUFFIX: varnish

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
!.vscode
node_modules
/core
/public
*.mo
107 changes: 0 additions & 107 deletions .gitlab-ci.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/ddanier/sub-pre-commit.git
rev: v3.7.1 # MUST match your pre-commit version
hooks:
- id: sub-pre-commit
alias: backend
name: "pre-commit for backend/"
args: ["-p", "backend/"]
files: "^backend/.*"
stages: ["commit"]
- id: sub-pre-commit
alias: frontend
name: "pre-commit for frontend"
args: ["-p", "frontend"]
files: "^frontend/.*"
stages: ["commit"]
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changes
## 1.0.0 (2024-08-23)

- Initial version [collective]
## 1.0.0 (2024-09-27)

- Initial version [PROCERGS]
Loading

0 comments on commit 14c02e9

Please sign in to comment.