updated workflow #51
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: ci | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| branches: | |
| - main | |
| - development | |
| pull_request: | |
| jobs: | |
| code_check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: install_tools | |
| run: pip install -r ./code_check_req.txt | |
| - name: run_code_check | |
| run: bash code_check.sh | |
| unit_tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| activate-environment: CondaDependencyCleaner | |
| - name: install CDC | |
| shell: bash -el {0} | |
| run: | | |
| conda init | |
| conda activate CondaDependencyCleaner | |
| conda install conda | |
| pip install . | |
| pip install -r ./tests/requirements.txt | |
| - name: run pytest | |
| shell: bash -el {0} | |
| run: pytest -v | |
| build_wheels: | |
| runs-on: ubuntu-latest | |
| needs: [unit_tests] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Build wheels | |
| run: pip wheel --no-deps . -w ./dist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./dist/**/*.whl | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [build_wheels] | |
| environment: | |
| name: publish | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download dist artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist |