2023-12-20 16:04:31 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
backend-pylint:
|
|
|
|
runs-on: docker
|
2023-12-20 16:15:12 +00:00
|
|
|
container: nikolaik/python-nodejs:python3.11-nodejs21
|
2023-12-20 16:04:31 +00:00
|
|
|
steps:
|
2023-12-20 16:08:26 +00:00
|
|
|
- name: Checkout source code
|
|
|
|
uses: https://code.forgejo.org/actions/checkout@v3
|
2023-12-20 16:21:23 +00:00
|
|
|
- name: Switch to correct directory
|
|
|
|
run: cd backend
|
2023-12-20 16:04:31 +00:00
|
|
|
- name: Install packages
|
|
|
|
run: |
|
2023-12-20 16:22:35 +00:00
|
|
|
ls
|
2023-12-20 16:04:31 +00:00
|
|
|
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
|
2023-12-20 16:15:12 +00:00
|
|
|
container: nikolaik/python-nodejs:python3.11-nodejs21
|
2023-12-20 16:04:31 +00:00
|
|
|
steps:
|
2023-12-20 16:08:26 +00:00
|
|
|
- name: Checkout source code
|
|
|
|
uses: https://code.forgejo.org/actions/checkout@v3
|
2023-12-20 16:21:23 +00:00
|
|
|
- name: Switch to correct directory
|
|
|
|
run: cd backend
|
2023-12-20 16:04:31 +00:00
|
|
|
- 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/*
|