Skip to content

add uvad,test and update setup.py #22

add uvad,test and update setup.py

add uvad,test and update setup.py #22

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main", "dev"]
pull_request:
branches: [ "main", "dev" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10.8', '3.11', '3.12']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
# - name: Install setuptools Cython numpy
# run: pip install setuptools Cython==3.0.8 numpy==1.25.2
- name: install dependence
working-directory: anomaly-detector
run: |
poetry lock --no-update
poetry install
- name: show pkg list
run: poetry run pip list
- name: compile cython
working-directory: ./
run: poetry run python setup.py build_ext --inplace
- name: run the test script
working-directory: anomaly-detector/tests
run: |
pip install pytest
poetry run python test_demo.py
poetry run python uvad_test.py
- name: Analyze code with pylint
run: |
pip install pylint
pylint --exit-zero $(git ls-files '*.py')
test_on_setup_whl:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10.8', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
# - name: Install setuptools Cython numpy
# run: pip install setuptools Cython==3.0.8 numpy==1.25.2
- name: install dependence
working-directory: anomaly-detector
run: |
poetry lock --no-update
poetry install
- name: gen .whl file by setup.py
working-directory: ./
run: poetry run python setup.py sdist bdist_wheel
- name: install .whl file
run: pip install dist/*.whl
- name: run the test script
working-directory: anomaly-detector/tests
run: |
pip install pytest
poetry run python test_demo.py
poetry run python uvad_test.py
# test_on_setup:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: install package by setup.py
# run: pip install .
# - name: run the test script
# working-directory: anomaly-detector/tests
# run: |
# pip install pytest
# python test_demo.py