-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/pip/urllib3-2.0.7
- Loading branch information
Showing
121 changed files
with
4,804 additions
and
932 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 |
---|---|---|
|
@@ -17,8 +17,6 @@ jobs: | |
matrix: | ||
include: | ||
- os: macos-latest | ||
env: | ||
CFLAGS: -arch arm64 -arch x86_64 | ||
TARGET: macos | ||
CMD_REQS: > | ||
mkdir -p pip-packages && cd pip-packages && pip wheel --no-cache-dir --no-binary tree_sitter,ijson,charset_normalizer,PyYAML .. && cd .. && | ||
|
@@ -33,8 +31,7 @@ jobs: | |
- os: ubuntu-20.04 | ||
TARGET: ubuntu | ||
CMD_REQS: > | ||
pip install -r requirements.txt | ||
pip install . | ||
pip install -r requirements.txt && pip install . | ||
CMD_BUILD: > | ||
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'") && | ||
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli/main.py && | ||
|
@@ -44,8 +41,7 @@ jobs: | |
- os: windows-latest | ||
TARGET: windows | ||
CMD_REQS: > | ||
pip install -r requirements.txt | ||
pip install . | ||
pip install -r requirements.txt && pip install . | ||
CMD_BUILD: > | ||
pyinstaller --add-binary "build\lib.win-amd64-cpython-311\staticcodecov_languages.cp311-win_amd64.pyd;." --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli\main.py && | ||
Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe" | ||
|
@@ -83,5 +79,54 @@ jobs: | |
tag: ${{ github.ref }} | ||
overwrite: true | ||
|
||
build_assets_alpine_arm: | ||
name: Build assets - Alpine and ARM | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- distro: "python:3.11-alpine3.18" | ||
arch: arm64 | ||
distro_name: alpine | ||
- distro: "python:3.11-alpine3.18" | ||
arch: x86_64 | ||
distro_name: alpine | ||
- distro: "python:3.11-bullseye" | ||
arch: arm64 | ||
distro_name: linux | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: ${{ matrix.arch }} | ||
- name: Run in Docker | ||
run: | | ||
docker run \ | ||
--rm \ | ||
-v $(pwd):/${{ github.workspace }} \ | ||
-w ${{ github.workspace }} \ | ||
--platform linux/${{ matrix.arch }} \ | ||
${{ matrix.distro }} \ | ||
./scripts/build_${{ matrix.distro_name }}_arm.sh ${{ matrix.distro_name }}_${{ matrix.arch }} | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
if: inputs.release == false | ||
with: | ||
path: ./dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} | ||
- name: Upload Release Asset | ||
if: inputs.release == true | ||
id: upload-release-asset | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} | ||
asset_name: codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
|
||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# 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 | ||
|
||
name: CLI CI Job | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-test-upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 2 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- 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=3.12junit.xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml | ||
flags: python3.12 | ||
fail_ci_if_error: true | ||
verbose: true |
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
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 |
---|---|---|
|
@@ -9,8 +9,6 @@ on: | |
jobs: | ||
create-release: | ||
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') && github.repository_owner == 'codecov' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CODECOV_RELEASE_PAT }} | ||
name: Create Github Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -22,11 +20,8 @@ jobs: | |
run: | | ||
echo release_version=$(grep -E "version=\"[0-9]\.[0-9]\.[0-9]\"" setup.py | grep -Eo "[0-9]\.[0-9]\.[0-9]") >> "$GITHUB_OUTPUT" | ||
- name: Create GH Release | ||
uses: softprops/[email protected] | ||
with: | ||
name: Release v${{ steps.get-release-vars.outputs.release_version }} | ||
tag_name: v${{ steps.get-release-vars.outputs.release_version }} | ||
generate_release_notes: true | ||
body: Autogenerated for ${{ steps.get-release-vars.outputs.release_version }}. Created for ${{ github.event.pull_request.html_url }} | ||
|
||
- name: Create GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CODECOV_RELEASE_PAT }} | ||
run: | | ||
gh release create v${{ steps.get-release-vars.outputs.release_version }} --title "Release v${{ steps.get-release-vars.outputs.release_version }}" --notes "Autogenerated for v${{ steps.get-release-vars.outputs.release_version }}. Created for ${{ github.event.pull_request.html_url }}" --generate-notes --target ${{ github.event.pull_request.head.sha }} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Enforce License Compliance | ||
|
||
on: | ||
pull_request: | ||
branches: [main, master] | ||
|
||
jobs: | ||
enforce-license-compliance: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Enforce License Compliance' | ||
uses: getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main | ||
with: | ||
fossa_api_key: ${{ secrets.FOSSA_API_KEY }} |
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 |
---|---|---|
|
@@ -163,3 +163,5 @@ cython_debug/ | |
# Vim temporary files | ||
*.swp | ||
*.swo | ||
|
||
.debug |
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
Oops, something went wrong.