-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull request #78 from DSD-DBS/fix-readme
- Loading branch information
Showing
2 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,11 @@ | |
name: Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: ["*"] | ||
pull_request: [main] | ||
branches: [main] | ||
tags: ["v*.*.*"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
|
@@ -22,33 +23,19 @@ jobs: | |
- "3.11" | ||
- "3.12" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{matrix.python_version}} | ||
uses: actions/setup-python@v3 | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: pip | ||
cache-dependency-path: pyproject.toml | ||
python-version: ${{matrix.python_version}} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{runner.os}}-pip-${{hashFiles('pyproject.toml')}} | ||
restore-keys: | | ||
${{runner.os}}-pip- | ||
${{runner.os}}- | ||
- name: Upgrade Pip | ||
run: |- | ||
python -m pip install -U pip | ||
- name: Add git PAT | ||
run: |- | ||
git config --global --add url."https://${{ secrets.PAT_GITHUB }}@github".insteadOf https://github | ||
- name: Pre-install private Github dependencies | ||
run: |- | ||
python -m pip install git+https://github.com/DSD-DBS/[email protected] | ||
run: python -m pip install -U pip | ||
- name: Install test dependencies | ||
run: |- | ||
python -m pip install '.[test]' | ||
run: python -m pip install '.[test]' | ||
- name: Run unit tests | ||
run: |- | ||
python -m pytest --cov-report=term --cov=capella2polarion --rootdir=. | ||
run: python -m pytest --cov-report=term --cov=capellambse --rootdir=. | ||
|
||
build: | ||
name: Build wheel | ||
|
@@ -75,6 +62,23 @@ jobs: | |
name: python-package-distributions | ||
path: dist/ | ||
if-no-files-found: error | ||
|
||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
cache: pip | ||
cache-dependency-path: pyproject.toml | ||
python-version: "3.12" | ||
- name: Upgrade pip | ||
run: python -m pip install -U pip | ||
- name: Install pre-commit | ||
run: python -m pip install pre-commit | ||
- name: Run Pre-Commit | ||
run: pre-commit run --all-files | ||
|
||
pypi: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
|
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