-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run Codecov for commits to main (#1751)
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Codecov | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- README*.md | ||
- VERSION_INFO | ||
- .ci/* | ||
- .readthedocs.yml | ||
- include/* | ||
- src/* | ||
- docs-src/* | ||
- docs-img/* | ||
- docs-jupyter/* | ||
- docs-doxygen/* | ||
- docs-sphinx/* | ||
- studies/* | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: 'coverage-${{ github.head_ref || github.run_id }}' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-20.04 | ||
|
||
env: | ||
PIP_ONLY_BINARY: cmake | ||
PYTHON_VERSION: "3.10" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
# Maybe share these across workflows? | ||
key: >- | ||
${{ github.job }} | ||
- name: Use ccache | ||
run: | | ||
echo "/usr/lib/ccache" >> $GITHUB_PATH | ||
echo "/usr/local/opt/ccache/libexec" >> $GITHUB_PATH | ||
- name: 'Python ${{ env.PYTHON_VERSION }}' | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '${{ env.PYTHON_VERSION }}' | ||
|
||
- name: Install NumPy | ||
run: python -m pip install numpy | ||
|
||
- name: Build | ||
run: 'python -m pip install -v .[test,dev]' | ||
|
||
- name: Print versions | ||
run: python -m pip list | ||
|
||
- name: Test | ||
run: >- | ||
python -m pytest -vv -rs tests --cov=awkward --cov-report=term | ||
--cov-report=xml | ||
- name: Upload Codecov results | ||
uses: codecov/codecov-action@v3 |