Improvements to user handling #30
Workflow file for this run
This file contains 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: Release | |
on: | |
release: | |
types: [published] | |
branches: | |
- "main" | |
jobs: | |
release: | |
name: Lint ubuntu-latest Py3.12 | |
# Run only for tagged releases publishing development or release candidates | |
# only to test.pypi, otherwise to both it and the main pypi. | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Additional info about the build | |
shell: bash | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
# More info on options: https://github.com/conda-incubator/setup-miniconda | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: "3.12" | |
environment-file: devtools/conda-envs/test_env.yaml | |
activate-environment: test | |
auto-update-conda: false | |
auto-activate-base: false | |
show-channel-urls: true | |
- name: Install package | |
# conda setup requires this special shell | |
shell: bash -l {0} | |
run: | | |
cd seamm_dashboard/static | |
npm install | |
du -hs node_modules | |
python only_needed_files.py | |
du -hs node_modules | |
cd ../../ | |
python -m pip install . --no-deps | |
conda list | |
- name: Install chromedriver binary and run tests | |
shell: bash -l {0} | |
run: | | |
export chrome_version=$(google-chrome --version | cut -d ' ' -f 3 | cut -d . -f 1) | |
export chrome_version_max=$(($chrome_version+1)) | |
pip install "chromedriver-binary<=$chrome_version_max" | |
pytest -v --cov=seamm_dashboard seamm_dashboard/tests/ | |
- name: CodeCov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} | |
- name: Install pypa/build | |
run: | | |
python -m pip install build --user | |
- name: Build a binary wheel and a source tarball | |
run: | | |
python -m build --sdist --wheel --outdir dist/ | |
ls -l dist/ | |
- name: Publish distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.test_pypi_password }} | |
repository_url: https://test.pypi.org/legacy/ | |
skip_existing: true | |
- name: Publish distribution 📦 to PyPI | |
if: contains(github.ref, 'dev') == false && contains(github.ref, 'rc') == false | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.pypi_password }} |