feat: Add methods to invite and kick users to/from Group #210
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: code coverage | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
types: | |
- ready_for_review | |
- closed | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
environment: testing | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Install dependencies and build package | |
run: | | |
poetry install | |
- name: Build coverage file | |
run: | | |
poetry run pytest --cov-config=pyproject.toml | tee pytest-coverage.txt | |
env: | |
NPSSO_CODE: ${{ secrets.NPSSO_CODE }} | |
USER_NAME: ${{ vars.USER_NAME }} | |
FRIEND_USER_NAME: ${{ vars.FRIEND_USER_NAME }} | |
BLOCKED_USER_NAME: ${{ vars.BLOCKED_USER_NAME }} | |
- name: PyTest Coverage comment | |
id: coverageComment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
hide-comment: true | |
badge-title: Coverage | |
pytest-coverage-path: ./pytest-coverage.txt | |
junitxml-path: ./pytest.xml | |
- name: Create Variable of Summary Report | |
id: summary_report | |
run: | | |
SUMMARY_REPORT=${{ steps.coverageComment.outputs.summaryReport }} | |
echo "::set-output name=content::$SUMMARY_REPORT" | |
- name: Update Readme with Coverage Html | |
run: | | |
sed -i '/<!-- Pytest Coverage Comment:Begin -->/,/<!-- Pytest Coverage Comment:End -->/c\<!-- Pytest Coverage Comment:Begin -->\n\${{ steps.coverageComment.outputs.coverageHtml }}\n<!-- Pytest Coverage Comment:End -->' ./README.md | |
- name: Commit & Push changes to Readme | |
uses: actions-js/push@master | |
with: | |
branch: ${{ github.head_ref || github.ref_name }} | |
message: Update coverage on Readme | |
github_token: ${{ secrets.GITHUB_TOKEN }} |