Skip to content

fix CI

fix CI #9

name: Full CI
on:
push:
branches: [main]
release:
types: [published]
workflow_dispatch:
inputs:
job:
description: 'Choose which job to run'
required: true
default: 'deploy'
type: choice
options:
- publish-module
- test-Django
- all
permissions:
contents: read
jobs:
publish-module:
if: github.event_name == 'release' || github.event.inputs.job == 'publish-module' || github.event.inputs.job == 'all'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: check for current folder
run: |
ls
- name: build package
run: |
python -m build
- name: Publish build
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
test-Django:
if: github.event.inputs.job == 'test-Django' || github.event.inputs.job == 'all' || github.event_name == 'release' || github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.10, 3.11, 3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
cd ./test/app/
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install ../../
- name: Run Tests
run: |
python manage.py test