diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index c03a8d7..0000000 --- a/.drone.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: pipeline -type: docker -name: test - -steps: - - name: run tests - image: python:3.10 - commands: - - pip install --upgrade pip - - pip install -r requirements.txt - - pip install pytest - - pytest tests/ \ No newline at end of file diff --git a/.gitea/workflows/python-test.yml b/.gitea/workflows/python-test.yml new file mode 100644 index 0000000..7e3b2c4 --- /dev/null +++ b/.gitea/workflows/python-test.yml @@ -0,0 +1,34 @@ +name: Python Test + +on: + push: + branches: [ "master", "main" ] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f "requirements.txt" ]; then + pip install -r requirements.txt + fi + pip install pytest + + - name: Run tests + run: | + if [ -d "tests" ]; then + pytest tests/ --verbose + else + echo "No tests directory found, skipping tests." + fi \ No newline at end of file