diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 96a1500..5024560 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,96 +2,18 @@ name: CI on: push: - branches: [main, master] + branches: [main] pull_request: - branches: [main, master] + branches: [main] jobs: test: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] - steps: - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e ".[dev]" - - - name: Run linting with Ruff - run: ruff check . - - - name: Run type checking with MyPy - run: mypy src/ --ignore-missing-imports - - - name: Run tests with pytest - run: pytest tests/ -v --cov=src --cov-report=term-missing - - - name: Upload coverage report - uses: codecov/codecov-action@v4 - with: - files: ./coverage.xml - fail_ci_if_error: false - - build: - runs-on: ubuntu-latest - needs: test - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 + - uses: actions/setup-python@v5 with: python-version: '3.11' - - - name: Install build dependencies - run: | - python -m pip install --upgrade pip - pip install build - - - name: Build package - run: python -m build - - - name: Check package - run: pip install dist/*.whl && audit --version - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist/ - - release: - runs-on: ubuntu-latest - needs: build - if: startsWith(github.ref, 'refs/tags/v') - permissions: - contents: write - - steps: - - uses: actions/checkout@v4 - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - - name: Create Release - uses: https://gitea.com/actions/release-action@main - with: - files: dist/** - title: ${{ github.ref_name }} - body: See [CHANGELOG](CHANGELOG.md) for details. - draft: false - prerelease: false + - run: pip install -e ".[dev]" + - run: pytest tests/ -v + - run: ruff check .