Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: dump the full command helptext #587

Merged
merged 5 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build_for_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ jobs:
python setup.py sdist bdist_wheel --plat-name=manylinux2014_x86_64
python setup.py bdist_wheel --plat-name=macosx-12.6-universal2
python setup.py bdist_wheel --plat-name=win_amd64
- name: Move src file to match PEP625
run: |
cd dist
newfilename=$(ls | grep *.tar.gz | sed 's/codecov-cli/codecov_cli/')
ls | grep *.tar.gz | xargs -I x mv -- x "$newfilename"
ls | grep *.tar.gz | xargs -I x mv -- x "$(ls | grep *.tar.gz | sed 's/codecov-cli/codecov_cli/')"
ls -al
cd ..
- name: Publish package to PyPi
Expand Down
83 changes: 55 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# yamllint disable rule:line-length
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

Expand All @@ -20,6 +22,31 @@ jobs:
run: |
make lint

detect-command-change:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install -e .
- name: Run command_dump
run: |
python command_dump.py
- name: Detect changes
run: |
if [ -n "$(git diff codecovcli_commands)" ]; then
echo "Please run `python command_dump.py` before submitting, or install the hooks"
echo "$(git diff codecovcli_commands)"
exit 1
fi

codecov-startup:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,34 +81,34 @@ jobs:
- python-version: "3.10"
- python-version: "3.9"
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 2
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: "${{matrix.python-version}}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install -e .
pip install -r tests/requirements.txt
- name: Test with pytest
run: |
pytest --cov --junitxml=${{matrix.python-version}}junit.xml
- name: Dogfooding codecov-cli
if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
run: |
codecovcli -v do-upload --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag python${{matrix.python-version}}
codecovcli do-upload --report-type test_results --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag python${{matrix.python-version}}
- name: Upload artifacts for test-results-processing
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{matrix.python-version}}junit.xml
path: ${{matrix.python-version}}junit.xml
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 2
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: "${{matrix.python-version}}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install -e .
pip install -r tests/requirements.txt
- name: Test with pytest
run: |
pytest --cov --junitxml=${{matrix.python-version}}junit.xml
- name: Dogfooding codecov-cli
if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
run: |
codecovcli -v do-upload --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag python${{matrix.python-version}}
codecovcli do-upload --report-type test_results --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag python${{matrix.python-version}}
- name: Upload artifacts for test-results-processing
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{matrix.python-version}}junit.xml
path: ${{matrix.python-version}}junit.xml

static-analysis:
runs-on: ubuntu-latest
Expand Down
Loading
Loading