Skip to content

Commit

Permalink
update github ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jashan-lco committed Mar 15, 2022
1 parent 4c31b8e commit a5df2d5
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 9 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand All @@ -26,12 +26,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U coverage coveralls
pip install .
pip install --upgrade poetry
poetry install
- name: Run tests
run: coverage run manage.py test --settings=test_settings
run: poetry run coverage run manage.py test --settings=test_settings
- name: Generate and send coveralls report
run: coveralls --service=github
run: |
pip install --upgrade coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -51,11 +53,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install poetry
- name: Build package and publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_OCS_AUTHENTICATION_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
poetry build -f wheel
poetry build -f sdist
poetry publish -u "__token__" -p '${{ secrets.PYPI_OBS_PORTAL_API_TOKEN }}'
56 changes: 55 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ requests = ">=2.22,<2.27"

[tool.poetry.dev-dependencies]
pytest = "^7.1.0"
coverage = "^6.3.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit a5df2d5

Please sign in to comment.