Bump codecov/codecov-action from 3 to 4 #62
Workflow file for this run
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
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries | |
# | |
# SPDX-License-Identifier: MIT | |
name: Build CI | |
on: [pull_request, push] | |
jobs: | |
build-wheel: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- uses: actions/checkout@v3 | |
- name: Build wheel | |
run: pip wheel -w dist --no-deps . | |
- name: check dist | |
run: pipx run twine check dist/* | |
- name: Archive wheel | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheel | |
path: ${{ github.workspace }}/dist/ | |
linters: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- uses: actions/checkout@v3 | |
- name: Install pre-commit and deps | |
run: pip install pre-commit -r requirements.txt -r examples/requirements.txt | |
- name: Setup problem matchers | |
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 | |
- name: Pre-commit hooks | |
run: pre-commit run --all-files | |
test-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install testing tools | |
run: pip install -r requirements.txt -r tests/requirements.txt | |
- name: Collect coverage | |
run: | | |
coverage run -m pytest -vv | |
coverage report -m | |
coverage xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./coverage.xml | |
verbose: true # optional (default = false) | |
build-bundles: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Translate Repo Name For Build Tools filename_prefix | |
id: repo-name | |
run: | | |
echo repo-name=$( | |
echo ${{ github.repository }} | | |
awk -F '\/' '{ print tolower($2) }' | | |
tr '_' '-' | |
) >> $GITHUB_OUTPUT | |
- name: Translate Repo Name For Build Tools package_prefix | |
id: pkg-name | |
run: | | |
echo pkg-name=$( | |
echo ${{ github.repository }} | | |
awk -F '\/' '{ print tolower($2) }' | |
) >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install deps | |
run: pip install circuitpython-build-tools | |
- name: Build assets | |
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --package_folder_prefix ${{ steps.pkg-name.outputs.pkg-name }} --library_location . | |
- name: Archive bundles | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bundles | |
path: ${{ github.workspace }}/bundles/ | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install deps | |
run: | | |
pip install -r docs/requirements.txt -r requirements.txt | |
sudo apt-get install graphviz | |
- name: Build docs | |
working-directory: docs | |
run: sphinx-build -E -W -b html . _build/html | |
- name: Archive docs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: ${{ github.workspace }}/docs/_build/html |