refactoring
This commit is contained in:
34
.gitea/workflows/analyze.yml
Normal file
34
.gitea/workflows/analyze.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Analyze code
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "dev"
|
||||
paths:
|
||||
- "src**"
|
||||
- "requirements.txt"
|
||||
pull_request:
|
||||
branches:
|
||||
- "dev"
|
||||
- "main"
|
||||
paths:
|
||||
- "src**"
|
||||
- "requirements.txt"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze code
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install pylint
|
||||
- name: Analysing the code with pylint
|
||||
run: pylint --exit-zero $(git ls-files 'src/*.py')
|
||||
75
.gitea/workflows/analyze_and_publish.yml
Normal file
75
.gitea/workflows/analyze_and_publish.yml
Normal file
@@ -0,0 +1,75 @@
|
||||
name: Analyze code and publish script
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
- "src**"
|
||||
- "requirements.txt"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze code
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install pylint
|
||||
- name: Analysing the code with pylint
|
||||
run: pylint --exit-zero $(git ls-files 'src/*.py')
|
||||
publish:
|
||||
name: Publish script
|
||||
needs: analyze
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
- name: Setup GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v4.2.0
|
||||
with:
|
||||
versionSpec: 6.4.x
|
||||
- name: Determine version
|
||||
uses: gittools/actions/gitversion/execute@v4.2.0
|
||||
id: gitversion
|
||||
with:
|
||||
configFilePath: ./.gitea/config/gitversion.yml
|
||||
- name: Create package root directory
|
||||
run: |
|
||||
mkdir package
|
||||
mkdir package/3d_renderer
|
||||
cp -r src/* package/3d_renderer/
|
||||
cp requirements.txt package/requirements.txt
|
||||
- name: Create .TAR.GZ archive
|
||||
uses: ksm2/archive-action@v1
|
||||
with:
|
||||
format: "tar.gz"
|
||||
name: 3d_renderer_${{steps.gitversion.outputs.SemVer}}
|
||||
root-directory: "package"
|
||||
- name: Create .ZIP archive
|
||||
uses: ksm2/archive-action@v1
|
||||
with:
|
||||
format: "zip"
|
||||
name: 3d_renderer_${{steps.gitversion.outputs.SemVer}}
|
||||
root-directory: "package"
|
||||
- name: Create Release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
tag_name: ${{steps.gitversion.outputs.SemVer}}
|
||||
name: ${{steps.gitversion.outputs.SemVer}}
|
||||
files: |-
|
||||
3d_renderer_${{steps.gitversion.outputs.SemVer}}.tar.gz
|
||||
3d_renderer_${{steps.gitversion.outputs.SemVer}}.zip
|
||||
|
||||
Reference in New Issue
Block a user