update packaging for release on pypi #31
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: DCA tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10"] | |
| steps: | |
| - name: Test DCA | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi | |
| python -m pip install flake8 codecov pytest-cov sphinx_rtd_theme | |
| python -m pip install -e . | |
| - name: Lint with flake8 | |
| run: | | |
| python -m flake8 src/dca tests --exit-zero | |
| - name: Test with pytest | |
| run: | | |
| python -m pytest -sv --cov=./ tests | |
| - name: Build docs | |
| run: | | |
| sphinx-build -W -b html docs/source docs/build | |
| - name: Codecov | |
| run: | | |
| python -m codecov |