Merge branch 'dev' into cz/fixTestsCI

This commit is contained in:
Cristhian Zanforlin Lousa 2024-06-26 23:45:52 -03:00 committed by GitHub
commit 00f6bea71b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 1017 additions and 339 deletions

14
.github/workflows/auto-update.yml vendored Normal file
View file

@ -0,0 +1,14 @@
name: Auto-update
on:
push:
branches:
- dev
- main
jobs:
Auto:
name: Auto-update
runs-on: ubuntu-latest
steps:
- uses: tibdex/auto-update@v2

50
.github/workflows/js_autofix.yml vendored Normal file
View file

@ -0,0 +1,50 @@
name: autofix.ci
on:
pull_request:
types: [opened, synchronize, reopened, auto_merge_enabled, auto_merge_disabled]
paths:
- "src/frontend/**"
push:
branches: [ "main" ]
paths:
- "src/frontend/**"
permissions:
contents: read
env:
NODE_VERSION: "21"
jobs:
autofix:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
id: setup-node
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache Node.js dependencies
uses: actions/cache@v4
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('src/frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Node.js dependencies
run: |
cd src/frontend
npm ci
if: ${{ steps.setup-node.outputs.cache-hit != 'true' }}
- name: Run Prettier
run: |
cd src/frontend
npm run format
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a

29
.github/workflows/py_autofix.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: autofix.ci
on:
pull_request:
types: [opened, synchronize, reopened, auto_merge_enabled, auto_merge_disabled]
paths:
- "poetry.lock"
- "pyproject.toml"
- "src/backend/**"
- "tests/**"
env:
POETRY_VERSION: "1.8.2"
jobs:
lint:
name: Run Mypy
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"
steps:
- uses: actions/checkout@v4
- uses: install-pinned/ruff@6b463d795ce39011cc004438ae507ae56235e12a
- run: ruff --fix-only .
- run: ruff format .
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a

View file

@ -14,11 +14,7 @@ on:
required: false
type: boolean
default: true
branch:
description: "Branch to release from"
required: true
type: string
default: "main"
env:
POETRY_VERSION: "1.8.2"
@ -180,4 +176,4 @@ jobs:
generateReleaseNotes: true
prerelease: ${{ inputs.pre_release }}
tag: v${{ needs.release-main.outputs.version }}
commit: ${{ inputs.branch }}
commit: ${{ github.ref }}

View file

@ -35,14 +35,8 @@ jobs:
poetry install
- name: Register problem matcher
run: echo "::add-matcher::.github/workflows/matchers/ruff.json"
- name: Run Ruff
- name: Run Ruff Check
run: poetry run ruff check --output-format=github .
- name: Run Ruff format
run: poetry run ruff format .
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply Ruff formatting
branch: ${{ github.head_ref }}