Implemented Forgejo CI
This commit is contained in:
parent
56b720e8b9
commit
ffa6d3254e
1 changed files with 44 additions and 0 deletions
44
.forgejo/workflows/ci.yml
Normal file
44
.forgejo/workflows/ci.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
backend-pylint:
|
||||
runs-on: docker
|
||||
container: python:3.11.0
|
||||
steps:
|
||||
- name: Setup venv
|
||||
run: |
|
||||
cd backend
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
- name: Install packages
|
||||
run: |
|
||||
pip install -e . -q
|
||||
python -m pip list --format=columns --disable-pip-version-check
|
||||
pip install pylint~=2.17.7 --disable-pip-version-check -q
|
||||
- name: Run pylint
|
||||
run: |
|
||||
pylint --version
|
||||
pylint **/*.py --exit-zero
|
||||
|
||||
build:package:
|
||||
needs: ["backend-pylint"]
|
||||
runs-on: docker
|
||||
container: python:3.11.0
|
||||
steps:
|
||||
- name: Setup venv and install packages
|
||||
run: |
|
||||
cd backend
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
- name: Install packages
|
||||
run: pip install build
|
||||
- name: Build package
|
||||
run: |
|
||||
python -m build
|
||||
cp dist ../dist -r
|
||||
- name: Save build artifacts
|
||||
uses: https://code.forgejo.org/actions/upload-artifact@v3
|
||||
with:
|
||||
name: packages
|
||||
path: dist/*
|
Loading…
Reference in a new issue