-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
62 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 |
---|---|---|
|
@@ -29,21 +29,11 @@ jobs: | |
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
- name: Install the project dependencies | ||
run: poetry install | ||
- name: Run the automated tests (for example) | ||
- name: Install dependencies | ||
run: poetry install -E all | ||
- name: Run pylint | ||
run: poetry run pylint dataplaybook tests | ||
|
||
# - name: Upgrade pip | ||
# run: python -m pip install --upgrade pip | ||
# - name: Add pylint | ||
# run: pip install pylint | ||
# - name: Install dataplaybook | ||
# run: pip install ".[mongodb,pptx,tests]" | ||
# - name: Run Pylint | ||
# run: | | ||
# pylint dataplaybook | ||
|
||
pytest: | ||
name: Run tests Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
@@ -73,11 +63,52 @@ jobs: | |
run: poetry install -E all | ||
|
||
- name: Run tests and generate coverage report | ||
run: pytest --cov=./dataplaybook --cov-report=xml | ||
run: poetry run pytest --cov=./dataplaybook --cov-report=xml | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
env_vars: PYTHON | ||
verbose: true | ||
|
||
release: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
needs: [pytest] | ||
if: startsWith(github.ref, 'refs/tags') | ||
|
||
runs-on: ubuntu-latest | ||
concurrency: release | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- name: Setup | Checkout Repository at workflow sha | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.sha }} | ||
|
||
- name: Setup | Force correct release branch on workflow sha | ||
run: | | ||
git checkout -B ${{ github.ref_name }} ${{ github.sha }} | ||
- name: Action | Semantic Version Release | ||
id: release | ||
# Adjust tag with desired version if applicable. | ||
uses: python-semantic-release/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
git_committer_name: "github-actions" | ||
git_committer_email: "[email protected]" | ||
|
||
- name: Publish | Upload package to PyPI | ||
uses: pypa/gh-action-pypi-publish@v1 | ||
if: steps.release.outputs.released == 'true' | ||
|
||
- name: Publish | Upload to GitHub Release Assets | ||
uses: python-semantic-release/[email protected] | ||
if: steps.release.outputs.released == 'true' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.release.outputs.tag }} |
This file was deleted.
Oops, something went wrong.