Fix/minor errors (#98) #9
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: prod | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.test.txt | |
- name: Test with unittest | |
run: | | |
coverage run --source=./hadar -m unittest discover tests | |
coverage xml -i | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
with: | |
name: coverage-report | |
path: coverage.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Test notebooks | |
run: | | |
git lfs pull | |
pip install -i https://test.pypi.org/simple/ hadar | |
cd examples | |
python3 utils.py --src=./ --check=./ | |
- name: Release pypi.org | |
run: | | |
export PYTHONPATH=$(pwd) | |
python3 setup.py sdist bdist_wheel | |
python3 -m twine upload dist/* -u __token__ -p $PYPI_PROD_TOKEN | |
env: | |
PYPI_PROD_TOKEN: ${{ secrets.PYPI_PROD_TOKEN }} |