adding gitea actions
This commit is contained in:
parent
aee594892b
commit
f6b8b731a5
65
.gitea/workflows/ci.yml
Normal file
65
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
name: Build and Publish
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
python-version: '3.10'
|
||||||
|
poetry-version: 1.8.3
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Build and Test
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
github-server-url: https://gitea.sheep-ghoul.ts.net
|
||||||
|
|
||||||
|
- name: Install Python 3
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: ${{ env.python-version }}
|
||||||
|
|
||||||
|
- name: Install Poetry # dependency management
|
||||||
|
uses: abatilo/actions-poetry@v2.1.6
|
||||||
|
with:
|
||||||
|
poetry-version: ${{ env.poetry-version }}
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: poetry install
|
||||||
|
|
||||||
|
- name: Run Tests # test script
|
||||||
|
run: poetry run python -m unittest discover -s tests
|
||||||
|
|
||||||
|
publishLib:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Package Library
|
||||||
|
needs: [build] # for ignoring bad builds
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
github-server-url: https://gitea.sheep-ghoul.ts.net
|
||||||
|
|
||||||
|
- name: Install Python 3
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: ${{ env.python-version }}
|
||||||
|
|
||||||
|
- name: Install Poetry # dependency management
|
||||||
|
uses: abatilo/actions-poetry@v2.1.6
|
||||||
|
with:
|
||||||
|
poetry-version: ${{ env.poetry-version }}
|
||||||
|
|
||||||
|
- name: Poetry Add Repo
|
||||||
|
run: poetry source add --priority=supplemental sargit https://git.sarsoo.xyz/api/packages/${{ secrets.PYPI_USERNAME }}/pypi
|
||||||
|
|
||||||
|
- name: Poetry Repo Creds
|
||||||
|
run: poetry config http-basic.sargit ${{ secrets.PYPI_USERNAME }} ${{ secrets.PYPI_KEY }}
|
||||||
|
|
||||||
|
- name: Poetry Build
|
||||||
|
run: poetry build
|
||||||
|
|
||||||
|
- name: Poetry Publish
|
||||||
|
run: poetry publish --repository sargit
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
python-version: [3.8]
|
python-version: [3.8]
|
||||||
poetry-version: [1.1.4]
|
poetry-version: [1.1.4]
|
||||||
os: [ubuntu-20.04, macos-latest, windows-latest]
|
os: [ubuntu-22.04]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2 # get source
|
- uses: actions/checkout@v2 # get source
|
||||||
|
Loading…
Reference in New Issue
Block a user